Lobsters benchmark results

Run latest · 2026-08-26T06:56:59Z · ec8572016b1a · spinel 5e040768f582

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
/hottestinline `render json:` is not lowered for strict targets, so the emit answers this route with its html armthe render-json monomorphizer: src/lower/as_json_shape.rs and as_json_writer.rs are committed; remaining is type inference for Computed pair values, nested-record and Array[String] encoding, the datetime offset format, and widening FormatBreadth2026-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 26/26 content parity Roundhouse no JIT 26/26 content parity Roundhouse AOT 22/24 content parity · 2 deferred 3.65× — Roundhouse YJIT vs Rails YJIT Roundhouse AOT 4.75× over the 21 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.

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

These ratios depend on run length. Roundhouse no JIT slowed 9.0% across its own timed run, so its ms/iter — and every multiplier drawn from it — would read differently at a different --time. Upward drift on the AOT lane is live-heap growth raising mark cost; downward drift on a JIT lane is warmup that has not finished.

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 AOT93.8 ms4.84× vs Railsn=92Roundhouse YJIT124.5 ms3.65× vs Railsn=64Roundhouse no JIT167.2 ms4.51× vs Railsn=46Rails YJIT454.1 msn=20Rails no JIT754.6 msn=20
stackJITavg ms/itermin–maxCVdriftitersvs Railsvs Rails
(parity only)
RoundhouseAOT93.7991.9–98.71.4%+3.2%924.84×4.75×
21 routes
RoundhouseYJIT124.48115.2–150.97.6%-1.9%643.65×
Roundhouseno JIT167.22155.4–185.55.7%+9.0%464.51×
RailsYJIT454.12442.2–474.11.8%-2.6%201.00×
Railsno JIT754.65738.8–773.61.0%-0.4%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: 6224 collections in the timed loop, 741 of them whole-heap.

Two ratios, because one lane is not rendering what Rails renders. Roundhouse AOT is at 22/26 content parity; over the 21 routes it renders equivalently it is 4.75× (88.9 ms/iter vs 421.9), against 4.84× 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.

Drifting lane: Roundhouse no JIT slowed 9.0% between the first and last quarter of its own timed iterations. A drifting lane's median depends on how long the run was, so its ratio is not a stable number — read it as a range, not a point. Lanes that hold steady drift under 1%.

YJIT during the timed window
lanecode regioniseqs compiledinvalidationscode GCscompile time
Roundhouse YJIT2,763 KiB / 3,900 KiB+200+2.6 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 — 93.5 ms/iter median over 92 iterations (15 warmup)

929399iteration 1iteration 92

Roundhouse YJIT — 117.4 ms/iter median over 64 iterations (15 warmup)

115117151iteration 1iteration 64

Roundhouse no JIT — 169.4 ms/iter median over 46 iterations (15 warmup)

155169186iteration 1iteration 46

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

442452474iteration 1iteration 20

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

739754774iteration 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-08-26T07:01:28Z · host showcase.party — one process per lane, JIT pinned per lane.

2. Per-endpoint breakdown

Where the overall 3.65× 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 1.33× 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.

Read the AOT bars against 22/26 content parity, not in isolation. 4 of its routes render something other than what Rails renders (worst by differing tokens: hottest, u_michell_wiegand, recent, active), and a route that renders less is faster for a reason that is not speed. The lanes drawn beside it are at full parity. Per-route detail in the content-parity section below.

railsroundhouseroundhouse AOT00110100ms/threads3.7×/newest4.2×/threads/:username3.4×/rss2.0×/comments2.9×/s/:story_id5.8×/top?length=1w1.7×/top?length=1d1.7×/top?length=1y1.7×/saved9.3×/settings14.3×/recent0.7×/u12.1×/replies/comments10.9×/replies/unread10.7×/active6.3×/upvoted/comments8.1×/upvoted/stories10.1×/replies/stories10.9×/hidden9.9×/replies9.9×/comments/:comment_id/reply7.2×/about7.2×
Per-endpoint table (23 endpoints)
endpointrailsrails no-JITroundhouseroundhouse no-JITAOTratiovisits/iter
/threads12.6922.443.425.182.493.72×3
/newest12.6722.793.044.823.374.17×5
/threads/:username9.89
own 8.26
17.152.89
own 2.25
4.292.04
own 1.57
3.42×2
/rss9.4114.214.645.932.062.03×4
/comments7.5913.622.603.661.902.92×4
/s/:story_id5.569.900.961.460.925.80×15
/top?length=1w3.985.452.352.482.271.69×2
/top?length=1d3.955.282.342.442.211.69×4
/top?length=1y3.765.202.172.262.37
own 2.06
1.74×2
/saved3.395.950.360.620.46
own 0.26
9.28×5
/settings2.884.820.200.310.1614.31×3
/recent2.664.373.643.760.06
own 0.04
0.73×2
/u cached2.163.080.180.290.24
own 0.17
floor 0.09
12.15×15
/replies/comments1.882.800.170.270.23
own 0.12
floor 0.11
10.93×3
/replies/unread1.852.980.170.270.20
own 0.11
floor 0.10
10.70×7
/active1.823.350.290.420.066.33×6
/upvoted/comments1.813.120.220.330.168.11×3
/upvoted/stories1.803.140.180.290.1210.10×6
/replies/stories1.792.750.160.260.17
own 0.11
10.87×2
/hidden1.793.200.180.300.16
own 0.12
9.89×4
/replies1.702.680.170.280.22
own 0.12
floor 0.10
9.91×3
/comments/:comment_id/reply1.662.800.230.350.25
own 0.23
floor 0.20
7.19×5
/about1.091.870.150.240.097.19×1

AOT is slower than the same emit on CRuby+YJIT on 9 of 23 endpoints by median, but only 3 of 23 on own work. The difference is collection arrival, not code — /u 1.38× → 0.59×, /replies/comments 1.34× → 0.69×, /replies 1.31× → 0.67×, /saved 1.26× → 0.72×, /replies/unread 1.18× → 0.65×, and 2 more lose on the median and win on the floor. 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 22/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 AOT73 MB51 MB baseline + 22 MB growthRoundhouse no JIT116 MB95 MB baseline + 21 MB growthRoundhouse YJIT136 MB95 MB baseline + 40 MB growthRails no JIT309 MB177 MB baseline + 132 MB growthRails YJIT346 MB184 MB baseline + 161 MB growth
stackJITbaselinepeakgrowthvs Rails (memory)
RoundhouseAOT51 MB73 MB+22 MB
Roundhouseno JIT95 MB116 MB+21 MB2.67×
RoundhouseYJIT95 MB136 MB+40 MB2.55×
Railsno JIT177 MB309 MB+132 MB1.00×
RailsYJIT184 MB346 MB+161 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 23/26)

Incomplete coverage: 3 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,45250050
/newest20061,25020061,250
/recent2002,67950050
/hottest declared gap20016,36920061,296
/rss20016,36220016,362
/privacy2002,3652002,365
/about2002,2382002,238
/settings20015,16720015,167
/top?length=1d2002,5812002,581
/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,3902007,390

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/active, /recentTypeError: can't convert nil into Integer
AOT/u/michell_wiegandNotImplementedError: gem facade: Markdowner.to_html is stubbed (write-path only; see runtime/gem_facades.rb)

5. Content parity vs Rails — Roundhouse YJIT 26/26, Roundhouse no JIT 26/26, Roundhouse AOT 22/24

26/26 routes render what Rails renders

Every parity route is fetched from real Rails and from the emit, and both bodies are parsed into a canonical token stream and diffed there. That makes the comparison blind to four things that are not differences — indentation and formatting whitespace between block elements, attribute order, void-element spelling (<img> vs <img />), and character-reference spelling (&#39; vs &apos;) — and blind to nothing else.

Normalization ledger (what the comparison forgives, and how often)
rulekindapplicationswhy
csrf-tokenmask29per-session token; a fresh value on every boot
relative-timemask109"3 hours ago" is a function of when the replay ran — the COUNT is masked, the unit is not
clock-countdownmask1"stop accepting comments in N minutes" ticks between the two replays
timestamp-valuemask109title=/datetime= instants differ by the gap between replays — digits are masked, the FORMAT is not
asset-prefixknown46emit serves /assets/NAME where Rails serves /stylesheets/ and /javascripts/
request-schemeknown1the Rails replay builds https:// envs, the emit replay http:// — a harness artifact, not an app difference

mask — varies per run or per session by construction and carries no information. known — a genuine, understood difference from Rails, folded so it does not drown the signal but counted here so it cannot be forgotten.

Roundhouse AOT — 22/24

22/24 routes render what Rails renders

Compared against the same Rails oracle, by the same token-stream rules. Ordered by size of difference.

routediffering tokensfirst difference
recent138
- <!doctype html>
- <html class="color-scheme-system" lang="en">
- <head>
+ "BENCHERR TypeError: can't convert nil into Integer"
active133
- <!doctype html>
- <html class="color-scheme-system" lang="en">
- <head>
+ "BENCHERR TypeError: can't convert nil into Integer"

- is Rails, + is the emit. Full hunks in spinel/content-parity.md.

Normalization ledger — Roundhouse AOT
rulekindapplications
csrf-tokenmask30
relative-timemask122
clock-countdownmask1
timestamp-valuemask122
asset-prefixknown44
request-schemeknown1

6. 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
commitec8572016b1a7cbbe96b3c3ce6f10ce4c6d80c4c
fixture commit09b76c8b0f94c8182080cdae01e95151f0e22dd9
captured2026-08-26T07:01:28Z
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 5e040768f582 [cc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0]
C compilercc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
AOT compile226.7 s
binary9.2 MiB
C warnings0
spinel warnings23

Host

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

Sequence

visits/iter106
warmup15
roundhouse iters64
rails iters20

Generated 2026-08-26T07:01:29Z from summary.json.