-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
measuring Java startup costs #64
Comments
I encourage you to play with the solutions on your own computer and you can even fork or create your own benchmark from scratch! While I agree that it is unfair to compare runtime performance including the startup time, it is still a valid benchmark if you consider it to be a CLI application. I consider increasing the number of operations by 10, but even then it will include the startup time. I will consider measuring the time inside the solutions for the next benchmark iteration to avoid the startup times, but there is no ETA on that. |
Which might be very significant or very insignificant — and as-long-as the difference is shown, you can allow others to decide if the difference seems significant to them. |
fwiw the same experiment with C# seems to show a smaller difference (dotnet --version 2.1.302)
|
My two necroposting cents. It's completely unfair to benchmark languages with JIT, such as all JVM, Python (PyPY), Javascript vs native binaries without proper warmup. While I agree that start time metric is important in certain scenarios, this project claims to measure performance, not start up time! Paragraphs like this:
are completely misleading when you include start up and JIT compilation time into measurement. The argument:
doesn't really hold, as there are ways to eliminate startup cost for JIT languages. |
It is a completely unscientific benchmark. My initial goal was to compare naïve implementations of exactly the same problem in different languages. This benchmark is good enough for me, and I never advocated for using this benchmark for anything serious. Keep in mind that there cannot be an ultimate benchmark. I also believe there is no ultimate programming language either |
The programs don't do much work so about 15% of the Java time is just startup costs that disappear (become amortised) if the program is run longer.
So performing 10 times the work and dividing the time by 10 gives a magical performance boost:
The text was updated successfully, but these errors were encountered: