[ 
https://issues.apache.org/jira/browse/ARTEMIS-1702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16377725#comment-16377725
 ] 

ASF subversion and git services commented on ARTEMIS-1702:
----------------------------------------------------------

Commit 60dbeae4381abbc809ae2ccc73ca501557e66093 in activemq-artemis's branch 
refs/heads/master from [[email protected]]
[ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=60dbeae ]

ARTEMIS-1702 ConcurrentLongHashMap and ConcurrentLongHashSet should avoid 
volatile set cost on put/remove

Most of the visibility guarantees of size/capacity fields modifications are 
already provided through optimistic locking, hence it could be used it instead 
of volatile set(s) on put/remove, making those methods more efficient.


> ConcurrentLongHashMap and ConcurrentLongHashSet should avoid volatile set 
> cost on put/remove
> --------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-1702
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1702
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.5.0
>            Reporter: Francesco Nigro
>            Assignee: Francesco Nigro
>            Priority: Minor
>             Fix For: 2.5.0
>
>
> ConcurrentLongHashSet/HashMap are making use of unecessary volatile store of 
> size/capacity for modifier methods. 
> The current JVM implementation of volatile store for multicore x86 is making 
> use of a StoreLoad barrier for this operation: the most expensive one.
> These volatile stores could be replaced by plain stores/lazySet ones with no 
> effects on the correctness of those methods.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to