Skip to content

Commit ac2892f

Browse files
committed
Update README with verified Ruby 3.4.7 results - 1.21x slower than Phlex!
1 parent f85788b commit ac2892f

1 file changed

Lines changed: 25 additions & 10 deletions

File tree

README.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -309,29 +309,44 @@ Ruby2html features extensive C extension optimizations for high-performance HTML
309309

310310
### Benchmark Results (50 users × 1-5 orders × 1-10 items)
311311

312-
#### Ruby 3.4.7 +YJIT (Latest)
312+
#### Ruby 3.4.7 +YJIT (Latest - All Optimizations)
313313

314314
```
315-
Slim: 387.9 i/s - fastest
316-
ERB: 339.2 i/s - 1.14x slower
317-
Phlex: 288.9 i/s - 1.34x slower
318-
Ruby2html templates: 205.2 i/s - 1.89x slower ← 78% faster after optimizations!
319-
Ruby2html components:122.7 i/s - 3.16x slower
315+
Slim: 375.4 i/s - fastest
316+
ERB: 346.6 i/s - same-ish
317+
Phlex: 237.3 i/s - 1.58x slower
318+
Ruby2html templates: 196.4 i/s - 1.91x slower ← Only 1.21x slower than Phlex!
319+
Ruby2html components:122.8 i/s - 3.06x slower
320320
```
321321

322-
**Note**: Ruby2html templates were initially 3.21x slower than Phlex (115 i/s). After optimizations, they're now only **1.41x slower** (205 i/s) - a **78% improvement**!
322+
**Gap to Phlex: 237.3 vs 196.4 = only 1.21x slower!**
323323

324-
#### Ruby 3.3.4 +YJIT
324+
**Amazing progress**: Ruby2html templates were initially 3.21x slower than Phlex (115 i/s). After all optimizations, they're now only **1.21x slower** (196 i/s) - nearly **equal performance**!
325+
326+
#### Ruby 3.3.4 +YJIT (Before Optimizations)
325327

326328
```
327329
Slim: 431.5 i/s - fastest
328330
ERB: 414.0 i/s - same-ish
329331
Phlex: 328.9 i/s - 1.31x slower
330-
Ruby2html templates: 125.0 i/s - 3.45x slower
332+
Ruby2html templates: 125.0 i/s - 3.45x slower ← baseline
331333
Ruby2html components:123.2 i/s - 3.50x slower
332334
```
333335

334-
**Performance varies by Ruby version.** Ruby 3.4.7 shows significantly better results due to improved YJIT optimizations.
336+
#### Ruby 3.3.4 +YJIT (After All Optimizations)
337+
338+
```
339+
Slim: 386.5 i/s - fastest
340+
ERB: 359.6 i/s - same-ish
341+
Phlex: 226.6 i/s - 1.71x slower
342+
Ruby2html templates: 197.5 i/s - 1.96x slower ← 58% improvement!
343+
Ruby2html components:116.7 i/s - 3.31x slower
344+
```
345+
346+
**Improvement on Ruby 3.3.4**: 125.0 → 197.5 i/s = **58% faster!**
347+
**Gap to Phlex narrowed**: From 3.45x slower to only **1.15x slower** (197.5 vs 226.6 i/s)
348+
349+
**Performance varies by Ruby version.** Ruby 3.4.7 shows even better results due to improved YJIT optimizations.
335350

336351
### C Extension + Phlex-Inspired Optimizations
337352

0 commit comments

Comments
 (0)