Closed serioga closed 2 years ago
@serioga thank you very much for your contribution! In general, I think I choose speed improvements done to the "main implementation" of a language rather than something like Babashka and PyPy.
Hm, still slower then I expected. Need to check benchmark methodogy...
Probably you measure app starting time, which is slower for Clojure comparing to Java
@serioga yes that is correct, currently startup and IO are included. There are some thoughts (#59) of getting "clean" data just for computing pi, but nothing is implemented yet.
OK, but for Clojure those figures are misleading :-)
In my tests this code was executed in about 400 ms. And previous one was about 2500 ms. Also Java warms up and works faster after this :-)
It depends on what you use Clojure for. For a long-running application, I agree. For a CLI application which is invoked from time to time, it's closer to what can be expected, imho.
I think that is why I would like to capture both data with startup and IO and just plain pi calculation in the future.
I would test nbb for CLI application. Also I would test something more long running (what requires tens seconds) to reduce significance of startup time. For startup time I would make separate test with zero op script, to measure which solutions are faster for launching short-term CLI apps.
Note that we had been advocating for this kind of changes in #13, #22, #35, etc... 🙂
Very interesting results. It made Clojure faster, but Clojure via Babashka slower 🤔 😅