by bhauer · 4y ago · 0 comments
Such a test will favor implementations that have extremely svelte boostrapping, allowing them to immediately begin executing the relevant code and return a result.
I feel a more useful test would be for the relevant string processing code to be run tens to thousands of times within the process itself, so as to diminish the relative importance of boostrap/warmup code and/or runtime optimization performed by VMs. Unless, of course, part of the intent was specifically to measure the impact of the bootstrapping.
But I don't think it would be fair: I use Python a lot, and if it's for scripting, you are happy with the fact it's very easy to write. However, it's slow to start, and you pay that each time you run the script.
To me, it makes sense in this exercice, which is heavily leaning toward scripting, we see the price of the VM start in the overall profiling.
Otherwise, let's use pypy, warm it up, a few 1000 times, and you may get closer to Go times.
But we don't use pypy for scripting.
But why does Swift have a long startup time in the first place? Shouldn’t it start near instantly like the C and Rust programs?
echo 'print("hello world")' > hello.swift && swiftc hello.swift -O -o hello
time ./hello
[1] https://www.swift.org/server/IMHO, VM startup time should be included and the first few passes (before JIT kicks in) should also be included.
Java has supposedly “nearly C-like performance” until you read the fine print.
(This should apply to C# as well.)
Is that just your assumption or have you measured that penalty for this tiny tiny program?
Might "the JVM's slow start time" in this case be insignificant?
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...