4 ms·
Testing on my machine, Hello World in java (openjdk 21) takes about 30ms. In contrast, "time" reports that rust takes 1ms, which is the limit of it's precision
by gizmo686 1y ago
Testing on my machine, Hello World in java (openjdk 21) takes about 30ms.
In contrast, "time" reports that rust takes 1ms, which is the limit of it's precision.
Python does Hello World in just 8ms, despite not having a separate AOT compilation step.
The general guidance I've seen for interaction is that things start to feel laggy at 100ms; so 30ms isn't a dealbreaker, but throwing a third of your time budget at the baseline runtime cost is a pretty steep ask.
If you want to use the application as a short lived component in a larger system, than 30ms on every invocation can be a massive cost.
- zigzag312 1y agoApp that actually does something will probably have even larger startup overhead in Java as there will be more to compile just-in-time.
- pjmlp 1y agoOnly when not using either AOT or JIT cache.
- 0cf8612b2e1e 1y agoI recall that Mercurial was really fighting their Python test harness. It essentially would startup a new Python process for each test. At 10ms per, it added up to something significant, given their volume of work to cover something as complicated as SCM.
- typpilol 1y ago10ms? Did they have like 100k tests?
- 0cf8612b2e1e 1y agoFound a 2014 thread where 10-18% of the test harness time was spent booting the interpreter for the 13,000 required instances. The deeper thread was showing some 500-700 seconds of test time was just the interpreter overhead. The original point of the article was how much worse the overhead was in Python3 vs Python2. https://mail.python.org/pipermail/python-dev/2014-May/134528.html https://mail.python.org/pipermail/python-dev/2014-May/134528...
- typpilol 1y agoThat's a lot more extreme than 10ms and yea I get your point better now
- guelo 1y agoI'm trying and failing to imagine a situation where 30ms startup time would be a problem. Maybe some kind of network service that needs to execute a separate process on every request?
- deleted 1y ago[deleted]
- tacticus 1y ago30ms is the absolute best case. Throw some spring in there and you're very quickly at 10s. rub some spring-soap and it's near enough to 60s
- davemp 1y ago30ms is pretty close to noticeable for anything that responds to user input. 30ms startup + 20-70ms processing would probably bump you into the noticeable latency range.