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

   As discussed, I've reverted my change to the GCD implementation for ints, 
and adapted the benchmarks. Inspired by one of your earlier comments, I also 
added a benchmark that tests the long implementation with ints. Here are my 
results for reference from my MacBoo with a `Intel(R) Core(TM) i7-8559U CPU @ 
2.70GHz` running `JDK 21.0.2, OpenJDK 64-Bit Server VM, 21.0.2+13-58`:
   ```
   Benchmark                            (numPairs)  (seed)   Mode  Cnt    Score 
  Error  Units
   GcdPerformance.gcdBigInteger             100000      42  thrpt   10   16.166 
± 0.510  ops/s
   GcdPerformance.gcdInt                    100000      42  thrpt   10  205.558 
± 4.193  ops/s
   GcdPerformance.gcdIntAdaptedForLong      100000      42  thrpt   10   49.751 
± 0.846  ops/s
   GcdPerformance.gcdLong                   100000      42  thrpt   10  105.440 
± 1.035  ops/s
   GcdPerformance.gcdLongAdaptedForInt      100000      42  thrpt   10  207.047 
± 0.848  ops/s
   GcdPerformance.gcdLongWithInts           100000      42  thrpt   10  194.136 
± 2.390  ops/s
   GcdPerformance.oldGcdLong                100000      42  thrpt   10   25.128 
± 0.106  ops/s
   ```


-- 
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