mlangc commented on PR #140:
URL: https://github.com/apache/commons-numbers/pull/140#issuecomment-1975073213

   Thanks a lot for the detailed analysis. I've adapted the benchmark according 
to your suggestions: I've changed the default number of pairs to 100_000 and 
generate new pairs after each iteration. Interestingly, now the new GCD 
implementation for `int` wins for me:
   
   ```
   Benchmark                               (numPairs)  (seed)   Mode  Cnt    
Score   Error  Units
   GcdPerformance.gcdBigInteger                100000      42  thrpt   10   
16.422 ± 0.217  ops/s
   GcdPerformance.gcdInt                       100000      42  thrpt   10  
211.602 ± 0.962  ops/s
   GcdPerformance.gcdLong                      100000      42  thrpt   10  
104.997 ± 0.392  ops/s
   GcdPerformance.oldGcdInt                    100000      42  thrpt   10  
207.989 ± 2.261  ops/s
   GcdPerformance.oldGcdIntAdaptedForLong      100000      42  thrpt   10   
50.588 ± 0.502  ops/s
   GcdPerformance.oldGcdLong                   100000      42  thrpt   10   
24.867 ± 0.099  ops/s
   ```
   
   with a `2,7 GHz Quad-Core Intel Core i7` and
   
   ```
   $ mvn -v
   Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
   Maven home: /usr/local/Cellar/maven/3.9.6/libexec
   Java version: 21.0.2, vendor: Homebrew, runtime: 
/usr/local/Cellar/openjdk/21.0.2/libexec/openjdk.jdk/Contents/Home
   Default locale: en_001, platform encoding: UTF-8
   OS name: "mac os x", version: "14.2.1", arch: "x86_64", family: "mac"
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to