niklas-heer / speed-comparison

A repo which compares the speed of different programming languages.
https://niklas-heer.github.io/speed-comparison
MIT License
475 stars 76 forks source link

Compile programs in release mode #2

Closed l3kn closed 1 year ago

l3kn commented 5 years ago

I think the results are a bit misleading because all programs are compiled without optimizations turned on (e.g. -O3 for C and C++, -C opt-level=3 for rust and --release for crystal).

Is that intentional?

From a quick test with the three languages above, the times for the three languages above are much faster and closer together.

niklas-heer commented 5 years ago

Hey, @l3kn thank you for your question.

No this is not intentional. Though I must say this was only a hobby project for me. I don't think my results should be taken too seriously. For me, it was to learn about how such a project could look like and experiment with more niche programming languages.

I currently don't intend to extend the project but I welcome every contribution. 😃

HybridDog commented 5 years ago

Out of curiosity I have tested the leibniz.lua with 100,000,000 rounds with lua5.3 and luajit. lua took 8.215 s and luajit did it in only 0.21 s, i.e. it is about 39 times faster. In the Readme luajit would have approximately a score of 72 / 39 = 1.85, when not considering the overhead.

niklas-heer commented 5 years ago

@HybridDog thank you for sharing your findings. If you'd like to send a Pull request with your numbers/modifications I make sure to merge it. :)

niklas-heer commented 1 year ago

There are now new results with some optimizations in some languages.

plot

I'm closing this issue for now. If you have any more questions, just let me know.