Roundhouse benchmark results

Run latest · captured 2026-11-22T05:03:13Z · bf4d4afd8655 · 95 cells × 3 runs · 5 endpoints × 19 targets
Artifacts: env.json · per-run.json · skipped.json · summary.json · summary.md
Methodology. AMD Ryzen 5 3600 6-Core Processor, 6c/12t, 3.6 GHz, boost disabled, governor=performance, 63 GB RAM, Ubuntu 24.04.5 LTS. Toolchains pinned via mise. Harness: scripts/bench — workers=1, c=64, 3×20s runs per cell after 20s warmup (rails-jruby 60s, rails-truffleruby 240s, truffleruby 120s — those lanes plateau later); the median of the 3 runs is reported (the run-to-run spread is in the stability section below). Quiet machine throughout. The managed-heap cells run under a fixed heap budget so their RSS is comparable to the other cells' working sets rather than the runtime's default share of host RAM: the JVM cells (jruby, kotlin) via -Xmx512m=-Xms512m, and the .NET cells (csharp, csharp-aot) via the equivalent DOTNET_GCHeapHardLimit (512 MB), and the TruffleRuby cells (truffleruby, rails-truffleruby) via --vm.Xmx — 512 MB for the emitted tree, 1 GB for stock Rails, which runs out of a 512 MB heap under TruffleRuby within a minute of load. Full hardware, toolchain versions, and the exact invocation are in the environment appendix below.

These numbers measure one specific Rails reference app — not arbitrary Rails workloads. See #16 for the fixture-fragility caveats.

rails-jruby is the stock-Rails-on-the-JVM baseline — the same blog, pinned to Rails 8.0 (one minor behind the others' 8.1) on a prerelease AR-JDBC adapter (activerecord-jdbcsqlite3-adapter 80.0.pre1), the only combination that drives ActiveRecord on JRuby 10 today.

rails-truffleruby is the stock-Rails-on-TruffleRuby baseline — the same Rails 8.1 fixture the rails lane serves, since TruffleRuby compiles the sqlite3 C extension and needs no JDBC adapter; truffleruby is the ruby lane's tree, unmodified, under the same interpreter. Both run the native standalone, single process, threads only (no fork).

spinel runs the same Roundhouse-emitted framework as the CRuby ruby cell, but compiled by Spinel behind its thread-per-connection server (a green thread per connection on the runtime's autodetected OS worker count) rather than CRuby + Puma — so the ruby → spinel gap is a runtime swap, not a framework or source change.

1. Throughput across targets

Each endpoint is its own chart. Bars are log-scaled; raw req/sec is shown at the right.

/articles

1001,00010,000100,000req/seckotlin25,254rust22,806csharp10,965csharp-aot9,832crystal9,377swift7,268typescript6,876elixir5,635jruby4,731spinel3,052go2,987truffleruby2,949python2,890ruby1,656ruby-int1,115rails-truffleruby797rails-jruby549rails-int309rails303

/articles/1

1001,00010,000100,000req/seckotlin30,482rust26,164csharp15,431crystal14,513csharp-aot12,839swift9,076elixir8,222typescript7,178jruby5,163truffleruby3,476go3,316python3,182spinel2,983ruby1,698ruby-int1,177rails-truffleruby996rails-jruby531rails-int305rails297

/articles/new

1001,00010,000100,000req/seckotlin64,016rust30,977csharp26,788csharp-aot26,165crystal21,507elixir14,301typescript12,111swift10,969truffleruby7,886jruby7,024python4,490spinel4,310go4,057ruby2,325rails-truffleruby1,809ruby-int1,603rails-jruby778rails-int458rails452

/articles.json

1001,00010,000100,000req/secrust32,542kotlin28,269csharp19,159csharp-aot16,053swift15,066crystal14,063elixir10,513typescript8,164jruby5,588go5,152spinel4,778truffleruby3,364python3,359ruby2,020rails-truffleruby1,417ruby-int1,401rails-jruby834rails-int586rails572

/articles/1.json

1001,00010,000100,000req/secrust47,640kotlin44,248csharp36,081csharp-aot30,250crystal27,880swift15,821elixir14,367typescript10,233jruby6,986go6,407spinel6,106truffleruby5,680python4,750rails-truffleruby2,972ruby2,472ruby-int1,699rails-jruby1,285rails-int906rails883

2. Lowerer dividend (ruby vs rails)

Same Ruby interpreter, same YJIT, same Puma — the only variable is whether the framework runtime is Rails or Roundhouse-emitted. The multiplier under each pair is the lift from the lowerer pipeline. Bars are log-scaled, so the multiplier, not bar height, is the ratio.

1001,00010,0001,656303/articles5.5×1,698297/articles/15.7×2,325452/articles/new5.1×2,020572/articles.json3.5×2,472883/articles/1.json2.8×rubyrails

The same comparison on the JVM: emitted jruby beats stock rails-jruby by 8.6× on /articles, against 5.5× for ruby over rails on CRuby — and the runtime swap alone is worth 1.8× to stock Rails, 2.9× to the emit.

The same comparison on TruffleRuby: emitted truffleruby beats stock rails-truffleruby by 3.7× on /articles, against 5.5× for ruby over rails on CRuby — and the runtime swap alone is worth 2.6× to stock Rails, 1.8× to the emit.

3. YJIT contribution

Each pair compares a cell with YJIT (ruby, rails) against its interpreter-only variant (ruby-int, rails-int). The bars show how far YJIT moves each.

05001,0001,5002,0002,5003,0001,6561,115303309/articles1,6981,177297305/articles/12,3251,603452458/articles/new2,0201,401572586/articles.json2,4721,699883906/articles/1.jsonrubyruby-intrailsrails-int

4. Cost economics (req/sec per GB of RSS)

Throughput normalized by memory footprint — req/sec divided by RSS in GB. This reorders the raw throughput charts above: targets with small working sets rise and high-RSS targets fall. Bars are log-scaled. How much the metric matters depends on the deployment shape — most on metered or serverless surfaces, least on bare metal with memory headroom.

/articles

1001,00010,000100,0001,000,00010,000,000req/sec/GBrust1,222,868crystal367,502swift161,033csharp-aot136,900csharp89,165go82,597kotlin49,243elixir41,510spinel36,527python35,959typescript20,932ruby10,893ruby-int8,284jruby5,500truffleruby3,850rails-int930rails865rails-jruby516rails-truffleruby501

/articles/1

1001,00010,000100,0001,000,00010,000,000req/sec/GBrust1,301,852crystal604,778swift194,669csharp-aot174,636csharp123,058go89,696elixir55,676kotlin47,777python39,541spinel37,678typescript21,917ruby10,973ruby-int8,590jruby4,793truffleruby4,491rails-int888rails826rails-truffleruby606rails-jruby471

/articles/new

1001,00010,000100,0001,000,00010,000,000req/sec/GBrust1,433,464crystal1,036,023csharp-aot352,400swift233,407csharp212,940go110,034elixir98,042kotlin94,414python55,788spinel55,351typescript37,286ruby14,651ruby-int11,205truffleruby10,098jruby6,481rails-int1,289rails1,215rails-truffleruby1,089rails-jruby657

/articles.json

1001,00010,000100,0001,000,00010,000,000req/sec/GBrust1,464,030crystal662,827swift318,957csharp-aot214,170csharp148,906go137,632elixir74,139spinel60,185python41,734kotlin37,666typescript25,951ruby12,753ruby-int9,881jruby5,083truffleruby4,280rails-int1,616rails1,520rails-truffleruby829rails-jruby662

/articles/1.json

1001,00010,000100,0001,000,00010,000,000req/sec/GBrust2,127,890crystal1,273,306csharp-aot405,217swift330,278csharp278,014go174,459elixir101,139spinel80,097python59,005kotlin56,870typescript33,145ruby15,090ruby-int11,801truffleruby7,135jruby6,351rails-int2,197rails2,125rails-truffleruby1,734rails-jruby1,019

5. HTML → JSON multiplier

Per-target lift going from /articles (HTML) to /articles.json (JSON). The asymmetry isn't JSON-escape vs HTML-escape — both paths concatenate and escape strings. What JSON skips is the layout chain (csrf_meta_tag, importmap, asset-manifest scan, content_for slots) and the per-row view helpers (link_to, button_to, dom_id, tag.*) that the HTML index template invokes for every record. The chart below shows the multiplier per target.

swift2.1×rails1.9×elixir1.9×rails-truffleruby1.8×csharp1.7×go1.7×csharp-aot1.6×spinel1.6×rails-jruby1.5×crystal1.5×rust1.4×ruby1.2×typescript1.2×jruby1.2×python1.2×truffleruby1.1×kotlin1.1× 1×2×3×4×5×6×

6. Memory footprint (RSS)

Max RSS observed across all endpoints, per target, sorted low to high. The field spans more than two orders of magnitude. The managed-heap cells (the JVM and .NET targets) run under a fixed heap budget rather than an organically-grown working set — see the note below the chart.

rust22 MBcrystal26 MBgo38 MBswift49 MBcsharp-aot76 MBpython82 MBspinel85 MBcsharp132 MBruby-int147 MBelixir151 MBruby167 MBtypescript336 MBrails-int422 MBrails425 MBkotlin796 MBtruffleruby815 MBjruby1,126 MBrails-jruby1,291 MBrails-truffleruby1,755 MB

The JVM cells run under a fixed -Xmx512m heap (the TruffleRuby cells under --vm.Xmx: 512 MB for the emit, 1 GB for stock Rails), so the heap can't grab a host-dependent share of RAM; the rest is metaspace and code-cache, bounded by the app's class count rather than the box. Read the JVM bars as a pinned budget, not an organically-grown working set like the other cells.

The .NET cells are capped the same way — DOTNET_GCHeapHardLimit at 512 MB, the -Xmx analog — so their RSS is a budget the GC collects within, not the host-proportional reservation Server GC takes by default. NativeAOT (csharp-aot) carries no JIT or warmup, so its working set is the leanest of the managed-heap cells.

7. Latency (p50 / p99 at c=64)

Latencies are at c=64 concurrent connections; treat p50 as the median per-connection wait and p99 as the tail. Lanes are ordered by measured median p50 across endpoints, fastest first.

target/articles/articles/1/articles/new/articles.json/articles/1.json
p50p99p50p99p50p99p50p99p50p99
kotlin2.012.31.610.00.58.01.811.21.17.4
rust2.67.92.26.81.95.11.85.61.23.7
csharp3.619.82.618.21.314.52.419.01.316.7
csharp-aot4.137.83.234.41.631.32.933.51.628.8
crystal6.99.74.26.22.93.94.57.02.33.3
swift8.217.86.515.75.215.73.811.13.810.0
elixir10.527.87.218.34.212.85.616.24.111.8
typescript9.613.79.314.05.46.87.111.86.58.9
jruby13.022.011.920.78.717.011.119.08.816.7
go20.675.818.599.111.7126.511.060.48.073.5
spinel19.672.720.076.414.253.412.544.49.743.4
truffleruby20.043.216.639.77.226.417.936.510.228.3
python22.125.120.223.014.415.919.221.913.616.5
ruby38.750.737.348.627.136.931.637.725.432.3
rails-truffleruby70.5156.356.6119.730.679.339.692.618.352.9
ruby-int56.177.353.572.639.254.946.855.237.346.8
rails-jruby104.8203.1109.7199.274.0141.869.1138.044.496.8
rails-int200.8371.1203.0417.7132.1249.4105.4145.065.6491.1
rails205.7362.5207.9404.7135.0247.0108.4149.966.4508.3

All values in milliseconds. Lower is better.

Run-to-run stability

Each cell is timed 3 times and the charts above report the median run. This section reads per-run.json directly to show how far the individual runs strayed from it. Across all 95 cells the median run-to-run coefficient of variation in req/sec is 1.15% — the timed runs of a given cell agree to a fraction of a percent, so the reported medians aren't masking noise.

The 18 cells that vary by more than 3% are concentrated in the lowest-throughput cells, where a small absolute swing is a larger fraction of the rate; in 8 of them the first timed run is the slowest, consistent with residual warmup the fixed 20s warmup doesn't fully absorb:

targetendpointrun 1run 2run 3CV
rails-truffleruby/articles38984479730.2%
truffleruby/articles1,5542,9493,00926.8%
crystal/articles9,3509,37713,09816.6%
python/articles/new6,2484,4904,45916.5%
python/articles2,8623,9272,89015.4%
typescript/articles.json9,8868,1647,15413.4%
typescript/articles7,7366,8766,2918.5%
typescript/articles/18,2327,1786,8048.2%
typescript/articles/new14,14412,11111,9577.8%
rails/articles/12973372916.6%
typescript/articles/1.json10,13411,40210,2335.4%
python/articles/1.json4,5694,7505,1465.0%
csharp-aot/articles/113,15212,83911,7364.8%
crystal/articles/114,51315,53213,8204.8%
rails-truffleruby/articles/new1,8551,8091,6774.2%
truffleruby/articles/new7,3467,8868,0884.0%
rails-jruby/articles5085555493.9%
crystal/articles/1.json28,01827,88026,0303.3%

req/sec per timed run; CV = standard deviation ÷ mean.

Raw cell data (95 rows)
targetendpointreq/secp50 (ms)p99 (ms)RSS (MB)req/sec/GB
rust/articles22,8062.577.94191,222,868
rust/articles/126,1642.226.77201,301,852
rust/articles/new30,9771.875.14221,433,464
rust/articles.json32,5421.765.60221,464,030
rust/articles/1.json47,6401.153.70222,127,890
crystal/articles9,3776.879.6926367,502
crystal/articles/114,5134.256.1524604,778
crystal/articles/new21,5072.903.89211,036,023
crystal/articles.json14,0634.547.0121662,827
crystal/articles/1.json27,8802.303.32221,273,306
go/articles2,98720.5675.853782,597
go/articles/13,31618.4799.143789,696
go/articles/new4,05711.66126.5137110,034
go/articles.json5,15211.0260.3638137,632
go/articles/1.json6,4077.9973.4637174,459
csharp-aot/articles9,8324.1237.8473136,900
csharp-aot/articles/112,8393.1534.4475174,636
csharp-aot/articles/new26,1651.5531.2876352,400
csharp-aot/articles.json16,0532.9233.5076214,170
csharp-aot/articles/1.json30,2501.5728.7876405,217
kotlin/articles25,2542.0312.2652549,243
kotlin/articles/130,4821.649.9765347,777
kotlin/articles/new64,0160.547.9769494,414
kotlin/articles.json28,2691.7911.2576837,666
kotlin/articles/1.json44,2481.077.3879656,870
swift/articles7,2688.1917.7946161,033
swift/articles/19,0766.5015.7447194,669
swift/articles/new10,9695.1815.6948233,407
swift/articles.json15,0663.7811.1348318,957
swift/articles/1.json15,8213.799.9849330,278
csharp/articles10,9653.6219.8212589,165
csharp/articles/115,4312.6118.22128123,058
csharp/articles/new26,7881.3414.47128212,940
csharp/articles.json19,1592.4118.95131148,906
csharp/articles/1.json36,0811.2916.74132278,014
spinel/articles3,05219.6372.728536,527
spinel/articles/12,98319.9676.378137,678
spinel/articles/new4,31014.2153.417955,351
spinel/articles.json4,77812.5444.458160,185
spinel/articles/1.json6,1069.6743.417880,097
elixir/articles5,63510.4827.7813941,510
elixir/articles/18,2227.2518.3215155,676
elixir/articles/new14,3014.2112.7714998,042
elixir/articles.json10,5135.6416.2514574,139
elixir/articles/1.json14,3674.1111.78145101,139
typescript/articles6,8769.5713.6833620,932
typescript/articles/17,1789.2813.9933521,917
typescript/articles/new12,1115.446.7933237,286
typescript/articles.json8,1647.0911.8032225,951
typescript/articles/1.json10,2336.508.8631633,145
python/articles2,89022.0925.108235,959
python/articles/13,18220.1522.988239,541
python/articles/new4,49014.3815.928255,788
python/articles.json3,35919.1721.948241,734
python/articles/1.json4,75013.5816.538259,005
ruby/articles1,65638.6650.7415510,893
ruby/articles/11,69837.2748.6415810,973
ruby/articles/new2,32527.1136.8816214,651
ruby/articles.json2,02031.5537.7216212,753
ruby/articles/1.json2,47225.4032.3316715,090
ruby-int/articles1,11556.0877.321378,284
ruby-int/articles/11,17753.5172.631408,590
ruby-int/articles/new1,60339.2454.9114611,205
ruby-int/articles.json1,40146.7955.221459,881
ruby-int/articles/1.json1,69937.2646.8514711,801
jruby/articles4,73112.9821.988805,500
jruby/articles/15,16311.9120.701,1034,793
jruby/articles/new7,0248.7416.951,1096,481
jruby/articles.json5,58811.1018.971,1255,083
jruby/articles/1.json6,9868.8216.711,1266,351
truffleruby/articles2,94920.0043.177843,850
truffleruby/articles/13,47616.6339.737924,491
truffleruby/articles/new7,8867.1926.3979910,098
truffleruby/articles.json3,36417.8936.478044,280
truffleruby/articles/1.json5,68010.1628.288157,135
rails/articles303205.68362.51358865
rails/articles/1297207.94404.70368826
rails/articles/new452135.05247.033811,215
rails/articles.json572108.43149.933851,520
rails/articles/1.json88366.36508.334252,125
rails-int/articles309200.83371.07340930
rails-int/articles/1305202.95417.67351888
rails-int/articles/new458132.14249.373641,289
rails-int/articles.json586105.44144.953711,616
rails-int/articles/1.json90665.61491.064222,197
rails-jruby/articles549104.75203.121,089516
rails-jruby/articles/1531109.72199.251,155471
rails-jruby/articles/new77873.95141.801,213657
rails-jruby/articles.json83469.08138.011,289662
rails-jruby/articles/1.json1,28544.3796.821,2911,019
rails-truffleruby/articles79770.47156.321,628501
rails-truffleruby/articles/199656.61119.711,681606
rails-truffleruby/articles/new1,80930.6479.271,7001,089
rails-truffleruby/articles.json1,41739.6492.591,749829
rails-truffleruby/articles/1.json2,97218.2952.941,7551,734
Environment (captured 2026-11-22T05:03:13Z)

Host

hostnameshowcase.party
OSUbuntu 24.04.5 LTS
kernelLinux showcase.party 6.8.0-147-generic #147-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 24 11:33:16 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
boardASRock B450 Pro4 R2.0
CPUAMD Ryzen 5 3600 6-Core Processor
topology6 cores / 12 threads
clockgovernor=performance, boost disabled, 3600 MHz max
memory64,228 MB

Toolchains

cargocargo 1.98.1 (797e8a9bc 2026-08-05)
crystalCrystal 1.20.2 [2482c62c1] (2026-05-15)
curlcurl 8.5.0 (x86_64-pc-linux-gnu) libcurl/8.5.0 OpenSSL/3.0.13 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 (+libidn2/2.3.7) libssh/0.10.6/openssl/zlib nghttp2/1.59.0 librtmp/2.3 OpenLDAP/2.6.10
dotnet10.0.301
gogo version go1.26.4 linux/amd64
jrubyjruby 10.1.1.0 (4.0.0) 2026-07-22 aaa95d57e1 OpenJDK 64-Bit Server VM 25.0.3+9-LTS on 25.0.3+9-LTS +indy +jit [x86_64-linux]
mise2026.5.15 linux-x64 (2026-05-23)
nodev26.3.0
python3Python 3.14.6
redis-serverRedis server v=7.0.15 sha=00000000:0 malloc=jemalloc-5.3.0 bits=64 build=d064f9f48c901a92
rubyruby 4.0.5 (2026-05-20 revision 64336ffd0e) +PRISM [x86_64-linux]
rustcrustc 1.98.1 (48a229cea 2026-09-01)
shardsShards 0.20.0 [b2b98ca] (2025-12-19)
spinelspinel 2026.10.25+7222 (455f98808) [gcc 13.3.0 (cc)]
sqlite33.45.1 2024-01-30 16:01:20 e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257ccalt1 (64-bit)
trufflerubytruffleruby 40.0.0 (2026-09-17), like ruby 4.0.2, Oracle GraalVM Native [x86_64-linux]
uvuv 0.11.22 (x86_64-unknown-linux-musl)
wrkwrk debian/4.1.0-4build2 [epoll] Copyright (C) 2012 Will Glozer

Harness

commandscripts/bench --port 19000 rails rails-int rails-jruby rails-truffleruby ruby ruby-int jruby truffleruby python spinel typescript elixir go csharp csharp-aot swift kotlin crystal rust
workers1
concurrency64
runs3 × 20s after 20s warmup
wrk threads2
endpoints/articles /articles/1 /articles/new /articles.json /articles/1.json
targetsrails, rails-int, rails-jruby, rails-truffleruby, ruby, ruby-int, jruby, truffleruby, python, spinel, typescript, elixir, go, csharp, csharp-aot, swift, kotlin, crystal, rust

Source

commitbf4d4afd8655b7081c60accd86a491e32d5e029c
branchmain
subjectMerge pull request #2290 from roundhouse-rb/maybe-aasm-scopes

Conditions at start

load average11.03 / 10.71 / 9.18
uptime06:03:14 up 37 days, 17:47, 0 user, load average: 11.03, 10.71, 9.18

Generated 2026-11-22T10:36:00Z from summary.json.