commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "matic@nimp.co.uk" <ma...@nimp.co.uk>
Subject [math] MATH-841 gcd speed up
Date Mon, 06 Aug 2012 01:44:13 GMT
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.
 
Sebastien

--------------------------------------------------------------------
mail2web.com - Microsoft® Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange



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


Mime
View raw message