Jai rewrite of Campfire serves pages 56x faster than Rails, 3x faster than Rust
lucasmeijer · x · 2026-10-20
Developer lucasmeijer rewrote 37signals' Campfire in Jonathan Blow's Jai language and opened a PR against basecamp/once-campfire-verification, passing all benchmark checks:
- 56x faster than the original Rails version, 3x faster than the Rust rewrite, 1.8x faster than the fastest C rewrite
- A single executable replaces Ruby, Puma, Redis, Resque and Thruster, and is a drop-in replacement (same SQLite database, storage layout, signed/encrypted cookies)
Performance tricks shared in the thread:
- Gzip small responses at level 1 instead of 6: nearly the same size, a fraction of the CPU, +5-12% on posting a message
- Read one SQLite snapshot per request, keying the page cache by that snapshot
- Serve static files straight from event loop threads; cache cookie decryption & verification state
- Drop mutex-guarded global stats; replace malloc/free with a per-request arena freed in one shot
Caveat: source and Docker image are public, but the Jai compiler itself isn't publicly released yet.
More from coding & agent
- Neon ships official AI Gateway adapter for TanStack AI with single-credential multi-model access — matei_zaharia · 2026-10-23
- Reflection AI's Beam agent auto-builds a Gemma-4 fine-tuning notebook, boosting accuracy 66.5% — danielhanchen · 2026-10-23
- Cua Spaces SDK lets Hermes and other agents run in sandboxes on your own hardware — Teknium · 2026-10-23
- PHP hit by two unauthenticated RCE flaws; ProjectDiscovery launches free internet-wide alert service — cyb3rops · 2026-10-23
- Modal open-sources Spindle, a Tinker-compatible training server that charges GPU time instead of tokens — josh_wills · 2026-10-23
- Testing the Azure Cosmos DB Agent Kit: what it found reviewing a Claude-built app, in RUs saved — adnan_hashmi · 2026-10-23