4 ms·
Optimizations are so fun. But the key is always to measure from end to end before you investigate, and after you change things, in a comparable manner. Too many
by coldcode 11y ago
Optimizations are so fun. But the key is always to measure from end to end before you investigate, and after you change things, in a comparable manner. Too many people guess or theorize or make random changes.
- brianwawok 11y agoAnd you need to know how to perf test. The OP shows a test that runs for a fraction of a second. The JVM will not even think about JIT until it runs a piece of code 5-10k times... so this is likely a test of how fast interpreted code runs, which has little to no value.
- kasey_junk 11y agoTo be fair, the blog post just shows the command output of a test run. That could have been the test runner extrapolating the run time from a longer running benchmark. The pull-request linked references some Benchmark attributes and all manner of scala magic I don't want to interpret right now. That said, your point holds and I'd be very skeptical that this benchmark measures what they think it does.