Lobsters benchmark results

Run lobsters · 2026-10-01T09:05:42Z · f677023b7c7a · spinel 1896d3d66

The performance numbers on this page are not trustworthy

Timings below are still shown, and are still real measurements of what the code did — but what the code did was not what Rails does, so they do not measure the same work and must not be compared. This banner is generated from the run's own data and disappears by itself once every lane renders what Rails renders on every route IN SCOPE, and every timed visit returns 200. Routes deferred out of scope are listed below with the reason; they are excluded from the timed sequence in every lane, including Rails, so the lanes still measure the same work.

2 routes the AOT lane is known not to render

routewhycloses withsince
/hottestthis snapshot's Story#as_json serializes a nested record (`submitter_user: user`), which the render-json monomorphizer declines, so the emit answers this route with its html armnested-record encoding: Story's writer calling User's, where User#as_json is the attrs + super(only:) idiom with four row-dependent keys, a pluck, and keybase_signatures (an Array of Hashes, which needs its own encoding)2026-08-03
/u/:usernameMarkdowner.to_html is a raising facade -- the AOT tree ships no CommonMark renderera Commonmarker/Markly facade over an iterative Node#walk plus the DOM surgery Markdowner does (h1-h6 to strong, images to links, rel=ugc, @mention linkifier); scripts/markly-conformance already carries vectors generated from the real gem2026-08-03

These are counted as failures in every number on this page — the parity badge above still reads them as not rendering what Rails renders. Listing them here separates a capability we have not built from a difference nobody has explained; both are failures, and only one is a surprise.

Roundhouse YJIT 25/26 content parity Roundhouse no JIT 25/26 content parity Roundhouse AOT 20/24 content parity · 2 deferred 1.94× — Roundhouse YJIT vs Rails YJIT Roundhouse YJIT 1.88× over the 22 routes it renders correctly Roundhouse no JIT 2.21× over the 22 routes it renders correctly Roundhouse AOT 4.46× over the 19 routes it renders correctly
Artifacts: matrix.json · env.json · spinel-tree.tgz · ruby-tree.tgz · rails/rails.json · rails-int/rails.json · ruby/summary.json · ruby-int/summary.json · spinel/summary.json
Methodology — ruby-bench's, deliberately. Every lane times under the ruby-bench harness rule: 15 full-sequence warmup iterations discarded from the stats, then more until at least the minimum timed iterations are recorded AND total wall clock — warmup included, as upstream counts it — reaches the minimum seconds. The reported figure is the average ms per iteration over the non-warmup iterations, the statistic ruby-bench itself prints; the median stays in each lane's JSON as a robustness cross-check. The stability and comparison numbers replay a frozen 106-visit sequence (versioned at bench/lobsters/frozen-sequence.json) so every run — and the Rails baseline — walks the identical path. Both stacks serve from an in-memory SQLite seeded at boot (file:lobsters_bench?mode=memory&cache=shared), the shape the ruby-bench lobsters benchmark runs. The per-route table further down replays each distinct route once, before warmup, to verify status, bytes and content — it publishes no latency; each lane's pre-warmup single shot stays in its summary JSON as a diagnostic.

The runtime × JIT matrix section re-runs the same frozen sequence once per interpreter × JIT lane — in-process, in-memory, single-threaded — so its rows differ only in the runtime under test.

Every lane runs ANALYZE once after seeding its in-memory copy (a departure from stock ruby-bench, whose fixture DB carries no sqlite_stat1): without planner statistics SQLite misplans the hottest-stories SELECT under /rss, /hottest, and /recent — a full-table walk plus sort instead of reading hotness_idx to the LIMIT, ~100× the query cost — and both stacks pay that same planner accident. Statistics restore the plan a production database would have; both lanes get identical stats, so the comparison is unchanged in kind and fairer in degree.

This measures one specific reference app (the ruby-bench lobsters fixture), not arbitrary Rails workloads. The Rails baseline runs the real Rails lobsters over the same sequence; the roundhouse cell serves the same routes from the Roundhouse-emitted framework.

1. Roundhouse vs Rails — runtime × JIT

5 lanes, three of them the claim. Rails YJIT is the baseline; Roundhouse YJIT is the like-for-like comparison against it — same runtime, same JIT, so the only variable is the code; Roundhouse AOT is the same emit through a different runtime, and is not at full content parity. The 2 no-JIT rows size the JIT's contribution and are not the headline.

1.94× faster than Rails — 266.8 ms/iter (avg) vs Rails' 518.4, both stacks CRuby with YJIT. The full field:

Every lane replays the same frozen sequence in-process, in-memory, single-threaded — no HTTP server, no load generator — so the only variable across rows is the interpreter × JIT under test (the ruby-bench lobsters-for-YJIT shape). Lower is better; whiskers span each lane's min–max.

Roundhouse AOT115.4 ms4.49× vs Railsn=72Roundhouse YJIT266.8 ms1.94× vs Railsn=23Roundhouse no JIT386.4 ms2.25× vs Railsn=20Rails YJIT518.4 msn=20Rails no JIT871.1 msn=20
stackJITavg ms/itermin–maxCVdriftitersvs Railsvs Rails
(parity only)
RoundhouseAOT115.39112.5–122.81.4%-0.7%724.49×4.46×
19 routes
RoundhouseYJIT266.84264.7–268.30.5%-0.8%231.94×1.88×
22 routes
Roundhouseno JIT386.37384.1–388.30.3%-0.5%202.25×2.21×
22 routes
RailsYJIT518.41509.7–541.61.6%-0.7%201.00×—
Railsno JIT871.07853.7–890.31.0%-0.2%201.00×—

Every lane queried SQLite 3.50.3 at runtime.

The AOT lane marks generationally — spinel's default collector since d3b1400d, attested by the binary's own counters rather than by what the harness exported. Roundhouse AOT: 711 collections in the timed loop, 608 of them whole-heap.

Two ratios, because one lane is not rendering what Rails renders. Roundhouse YJIT is at 25/26 content parity; over the 22 routes it renders equivalently it is 1.88× (243.6 ms/iter vs 459.0), against 1.94× over the whole sequence; Roundhouse no JIT is at 25/26 content parity; over the 22 routes it renders equivalently it is 2.21× (354.2 ms/iter vs 782.3), against 2.25× over the whole sequence; Roundhouse AOT is at 20/26 content parity; over the 19 routes it renders equivalently it is 4.46× (75.4 ms/iter vs 336.3), against 4.49× over the whole sequence. Both sides of the restricted division cover the same routes. The unrestricted number is not wrong, but part of it is earned by rendering less.

YJIT during the timed window
lanecode regioniseqs compiledinvalidationscode GCscompile time
Roundhouse YJIT2,759 KiB / 3,900 KiB+200+2.7 ms

Deltas across the timed iterations only — warmup is excluded, so a zero row means YJIT had finished its work before the clock started. Non-zero iseqs compiled means new code was still being generated while being measured; invalidations means compiled code was being thrown away and redone; a non-zero code GCs means the code region filled and YJIT reclaimed it, after which previously-compiled paths must be compiled again.

“vs Rails” is a speed ratio — Rails' ms/iter ÷ this row's, at the same JIT level — so 3× means three times faster. Memory is a separate section below. CV = per-lane standard deviation ÷ mean across the timed iterations.

Per-lane iteration stability (5 lanes)

Roundhouse AOT — 115.2 ms/iter median over 72 iterations (15 warmup)

113115123iteration 1iteration 72

Roundhouse YJIT — 267.3 ms/iter median over 23 iterations (15 warmup)

265267268iteration 1iteration 23

Roundhouse no JIT — 386.1 ms/iter median over 20 iterations (15 warmup)

384386388iteration 1iteration 20

Rails YJIT — 515.5 ms/iter median over 20 iterations (15 warmup)

510516542iteration 1iteration 20

Rails no JIT — 870.5 ms/iter median over 20 iterations (15 warmup)

854871890iteration 1iteration 20

Each column is one timed iteration, scaled within a tight band around the lane's spread; the dashed line is the median.

Lanes measured 2026-10-01T09:09:29Z · host showcase.party — one process per lane, JIT pinned per lane.

2. Per-endpoint breakdown

Where the overall 1.94× win comes from — each endpoint's median latency over every timed visit of the frozen sequence, per lane. Bars are log-scaled; the ratio at the right is Rails ÷ roundhouse (both CRuby +YJIT) (green = roundhouse faster). The chart draws rails, roundhouse, roundhouse AOT; the no-JIT lanes appear as extra columns in the table below.

Both headline ratios include the transpile. Isolating the two: transpiling accounts for the bulk of the win, and AOT compilation adds a further 2.31× over the same emit running on CRuby+YJIT — in aggregate only, since AOT is faster on the heavy routes and slower on the cheap ones, where per-request fixed costs dominate.

A diagnostic breakdown, not a re-derivation: per-endpoint medians don't sum to the sequence median (GC and ordering don't decompose linearly), and the sub-millisecond rows sit near clock resolution — trust the ranking, not the third decimal.

railsroundhouseroundhouse AOT0110100ms/newest3.0×/threads2.9×/threads/:username2.8×/rss1.9×/comments2.0×/s/:story_id2.7×/top?length=1d1.1×/top?length=1w1.1×/top?length=1y1.1×/saved2.2×/settings2.1×/recent0.5×/u1.6×/replies/comments1.4×/upvoted/comments1.3×/replies/unread1.3×/active1.3×/replies/stories1.4×/upvoted/stories1.3×/hidden1.3×/replies1.3×/comments/:comment_id/reply1.2×/about0.8×
Per-endpoint table (23 endpoints)
endpointrailsrails no-JITroundhouseroundhouse no-JITAOTratiovisits/iter
/newest14.5426.494.847.592.32
own 2.06
3.00×5
/threads14.4625.955.057.682.232.86×3
/threads/:username11.35
own 9.43
19.634.106.232.10
own 1.81
2.77×2
/rss10.8416.395.847.941.71
own 1.50
1.86×4
/comments8.6915.744.366.292.101.99×4
/s/:story_id6.4011.402.393.560.882.68×15
/top?length=1d4.516.064.034.842.761.12×4
/top?length=1w4.516.174.044.842.741.12×2
/top?length=1y4.335.933.884.622.671.12×2
/saved3.826.811.772.720.602.15×5
/settings3.285.501.582.350.432.08×3
/recent2.975.025.636.474.530.53×2
/u cached2.493.541.542.350.411.62×15
/replies/comments2.143.171.492.320.53
own 0.43
1.44×3
/upvoted/comments2.143.521.592.370.50
own 0.44
1.34×3
/replies/unread2.113.361.602.380.451.32×7
/active2.113.831.662.490.501.27×6
/replies/stories2.093.201.542.300.52
own 0.41
1.36×2
/upvoted/stories2.053.601.562.370.431.32×6
/hidden2.023.701.542.360.481.30×4
/replies1.983.061.542.340.53
own 0.41
1.28×3
/comments/:comment_id/reply1.903.201.552.370.541.23×5
/about1.262.141.51
own 1.28
2.260.390.83×1

AOT is slower than the same emit on CRuby+YJIT on 0 of 23 endpoints by median, but only 0 of 23 on own work. Routes that lose on both are the ones where the emitted code is genuinely behind.

All lane columns are median ms per visit; ratio = rails ÷ roundhouse (the +YJIT pair). The AOT column is the spinel-compiled binary — same emit, different runtime, and not at full content parity (see above). A route marked cached serves its timed visits from a cache in the app itself (lobsters keeps some whole pages for 24h), in every lane — those medians price a cache hit, not the render. An own figure appears where a route's median runs more than 10% above its own work (p25 of its visits) — the gap is collection triggered during that visit but caused by the heap the whole sequence built, so it belongs to the lane rather than to the route. It is largest on the cheapest routes, which is where the median is least trustworthy as a per-route cost. A floor figure appears below that where p25 is itself more than 10% above the fastest visit recorded: p25 only removes collection cost when fewer than a quarter of a route's visits collect, and where more than a quarter do, p25 is still pricing marks. The floor is one sample and therefore noisy downward — read it as a bound, not a measurement.

3. Memory footprint

Peak resident memory of each lane's replay process — lower is better. Because the lanes replay in-process, each one measures itself (VmHWM from /proc/self/status), so this is the whole stack: interpreter, framework, the in-memory fixture DB, and whatever the timed run retains on top.

The bar splits at the point the sequence starts. The solid segment is the baseline — everything loaded and seeded, before a single visit. The translucent segment is growth across the timed run. The two say different things: baseline is what the stack costs to stand up, growth is what serving retains.

Roundhouse AOT is at 20/26 content parity; Roundhouse no JIT is at 25/26 content parity; Roundhouse YJIT is at 25/26 content parity. Peak memory is measured over the same sequence as the timings, so a lane that renders less also allocates and retains less — read its bar the way you read its ms/iter, not as a like-for-like footprint.

Roundhouse AOT89 MB64 MB baseline + 24 MB growthRoundhouse no JIT112 MB99 MB baseline + 13 MB growthRoundhouse YJIT128 MB99 MB baseline + 28 MB growthRails no JIT306 MB176 MB baseline + 129 MB growthRails YJIT345 MB183 MB baseline + 163 MB growth
stackJITbaselinepeakgrowthvs Rails (memory)
RoundhouseAOT64 MB89 MB+24 MB—
Roundhouseno JIT99 MB112 MB+13 MB2.73×
RoundhouseYJIT99 MB128 MB+28 MB2.70×
Railsno JIT176 MB306 MB+129 MB1.00×
RailsYJIT183 MB345 MB+163 MB1.00×

“vs Rails (memory)” is peak RSS ÷ peak RSS at the same JIT level — not the speed ratio in the matrix table above; the two differ. Baseline is sampled after the in-memory fixture DB is seeded, and it is not a common floor across lanes — each stack loads its own framework, so subtracting one lane's baseline from another's peak is meaningless.

4. Coverage — HTTP 200 (26/26 · spinel 25/26)

Incomplete coverage: 1 route(s) fail on the spinel AOT lane — the failing routes' visits short-circuit cheaply, so treat the affected lane's timing rows above as optimistic. Details in the table.

Per-route table (26 routes)
routestatusbytesAOTAOT bytes
/u cached200173,521200173,521
/active2002,4522002,452
/newest20061,25020061,250
/recent2002,6792002,679
/hottest declared gap20016,36920061,296
/rss20016,36220016,362
/privacy2002,3652002,365
/about2002,2382002,238
/settings20015,16720015,167
/top?length=1d2002,5812002,584
/top?length=1w2002,5842002,584
/top?length=1y2002,5842002,584
/hidden2002,5072002,507
/saved2005,0482005,048
/upvoted/stories2002,6802002,680
/comments20035,71620035,716
/upvoted/comments2002,7302002,730
/threads20057,90720057,907
/comments/6srqij/reply2002,6032002,603
/threads/michell_wiegand20057,91620057,916
/u/michell_wiegand declared gap2004,209500117
/replies2002,6732002,673
/replies/comments2002,6692002,669
/replies/stories2002,6762002,676
/replies/unread2002,7132002,713
/s/enr7ye2007,3902005,687

This table verifies parity — what each route answered and how much of it — not speed; the timing sections above are the performance numbers. A route marked cached serves its timed visits from a cache in the app itself (lobsters keeps some whole pages for 24h), in every lane. An AOT byte count is flagged when it falls more than 10% short of the CRuby lane's — a 200 that renders a fraction of the page.

Why they fail — grouped by reason, because a shared cause is one fix:

laneroute(s)reason
AOT/u/michell_wiegandNotImplementedError: gem facade: Markdowner.to_html is stubbed (write-path only; see runtime/gem_facades.rb)

5. Environment & provenance

Run, stacks, sequence

Run

commandscripts/bench-lobsters rails rails-int ruby ruby-int spinel --time 20 --src /home/rubys/ruby-bench/benchmarks/lobsters
source/home/rubys/ruby-bench/benchmarks/lobsters
commitf677023b7c7a0b6f5283964f7b6ec06743a4b58c
fixture commit17dcac94f1b11d637abc2d4e132ce69f8fac4241
captured2026-10-01T09:09:29Z
databasefile:lobsters_bench?mode=memory&cache=shared
story / commentenr7ye / 6srqij

Stacks

roundhouse rubyruby 4.0.5 (2026-05-20 revision 64336ffd0e) +YJIT +PRISM [x86_64-linux]
rails rubyruby 4.0.5 (2026-05-20 revision 64336ffd0e) +YJIT +PRISM [x86_64-linux]
rails8.1.1

AOT toolchain

spinel (AOT)spinel 2026.09.12+3401 (1896d3d66) [gcc 13.3.0 (cc)]
C compilercc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
AOT compile176.2 s
binary12.1 MiB
C warnings58
spinel warnings0

Host

hostshowcase.party
cpuAMD Ryzen 5 3600 6-Core Processor
cores12
kernelLinux 6.8.0-139-generic

Sequence

visits/iter106
warmup15
roundhouse iters23
rails iters20

Generated 2026-10-01T14:18:45Z from summary.json.