On 8/5/12 6:44 PM, ma...@nimp.co.uk wrote:
> Hello,
>
> The gcd(int,int) method of ArithmeticUtils seems 2 times slower than the
> naive approach using modulo operator.
> Gilles tested the patch separately and found similar performance penalty.
> Please check it out: 
> https://issues.apache.org/jira/browse/MATH-841?page=com.atlassian.jira.plugi
> n.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428944#comment-1
> 3428944
>
> Anyone aware of an environment were the modulo operator is painfully slow ?
>
> Gilles pointed out that my patch don't conform to CM formating style, I
> will correct that as well as the javadoc (its mention of the binary gcd
> algorithm) if the code change is basically approved here. Please let me
> know.

It is probably worth doing some research in the archives on this
function.  I suspect there are reasons for the implementation
choices made in the current impl.  Could be bad reasons / bad impl,
but IIRC there was a fair amount of discussion on this.

Phil
>  
> Sebastien
>
> --------------------------------------------------------------------
> mail2web.com - Microsoft® Exchange solutions from a leading provider -
> http://link.mail2web.com/Business/Exchange
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


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

Reply via email to