Check our work
Every number on this site comes from code you can run. The code and the raw results live in one public repository: github.com/adamzwasserman/honest-code-traces.
The program
One small program: build an order, add three items, apply a coupon, then compute the total, the discount, the tax and the grand total. We wrote it in 11 languages, as an average programmer would, with a class and separate method calls. We also wrote a version made of plain functions. Neither version is tuned for performance. The class timings leave out timestamp writes.
Tools and versions
| Language | Version | Timing tool |
|---|---|---|
| C++ | g++ 15.2.0 | Google Benchmark, five repetitions |
| Java | OpenJDK 21.0.12 | JMH, three forks of five one-second iterations |
| JavaScript | Node 22.23.3 (V8) | mitata, one process per setting |
| Python | CPython 3.14.4, PyPy 7.3.20 | pyperf, ten processes of five values |
| Ruby | Ruby 3.3.8 | benchmark-ips |
| PHP | PHP 8.5.4 | the program's own loop, three runs |
Everything ran in an Ubuntu 26.04 container on a rented eight-core virtual machine.
Where the data lives
The optimizer settings are in measured/optimizer-dial, and the memory layout runs are in measured/layout, measured/layout-others and measured/layout-raw. The scripts are in harness/dial, harness/layout and harness/checks. HotSpot's own log of what it inlined is in measured/optimizer-dial/inlining.
Limits
- The server is a virtual machine and hides its real cache layout.
- We ran each V8 setting in one process, so those rows have no spread figure.
- PyPy implements Python 3.11, not 3.14.
- Ruby has no JIT row, because our Ruby build lacks YJIT.
- The program is small and every figure covers one scenario.
- The memory layout pages demonstrate a textbook effect. They are not a study.
If you find a mistake, open an issue.