sassa_nf ([personal profile] sassa_nf) wrote in [personal profile] vak 2024-11-27 10:00 pm (UTC)

OpenJDK 11
Benchmark           (size)  Mode  Cnt       Score      Error  Units
Fibo.FiboRecursive      40  avgt   25  922753.617 ± 2747.036  us/op

0.9s, basically.


OpenJDK 17
Benchmark           (size)  Mode  Cnt        Score      Error  Units
Fibo.FiboRecursive      40  avgt   25  1032010.482 ± 8309.430  us/op

1s, basically.


OracleJDK 23
Benchmark           (size)  Mode  Cnt        Score      Error  Units
Fibo.FiboRecursive      40  avgt   25  1082715.628 ± 6358.441  us/op


I would expect your numbers to be dominated by JVM startup. Are you on SSD?

At the same time, fibonacci using GCC is 0.38s, and using clang is 0.56s, so it's not just a slow computer.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at [email protected]