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

ASF subversion and git services commented on HTTPCORE-535:
----------------------------------------------------------

Commit e6f3d649c3956422a8e62a61fec9feb922a056fc in httpcomponents-core's branch 
refs/heads/master from xiaohu-zhang
[ https://git-wip-us.apache.org/repos/asf?p=httpcomponents-core.git;h=e6f3d64 ]

HTTPCORE-535: optimized I/O worker selection


> mod workerCount is power of two  can be improved as &(workerCount-1)
> --------------------------------------------------------------------
>
>                 Key: HTTPCORE-535
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-535
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore NIO
>            Reporter: silver9886
>            Priority: Critical
>         Attachments: myportfolio-financial-planning-tool1.png
>
>
> if workerCount is power of two . improve 
> final int i = Math.abs(currentWorker.incrementAndGet() % workerCount);
> to be 
> final int i = Math.abs(currentWorker.incrementAndGet() & (workerCount-1) );



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to