docs/content/benchmark/_index.md (5875B)
1 +++
2 title = "Benchmark"
3 description = "Five generators, one machine, one corpus — and the definitions published"
4 weight = 60
5 toc = true
6 +++
7
8 ## minimal — a heading and a paragraph
9
10 <div class="bench">
11 <span class="b-name">sqzass</span><span class="b-row"><svg><rect class="b-us" width="0.385%" height="100%" rx="3"></rect></svg><span class="b-val">18 ms</span></span>
12 <span class="b-name">Hugo</span><span class="b-row"><svg><rect width="2%" height="100%" rx="3"></rect></svg><span class="b-val">93 ms</span></span>
13 <span class="b-name">Zola</span><span class="b-row"><svg><rect width="3%" height="100%" rx="3"></rect></svg><span class="b-val">141 ms</span></span>
14 <span class="b-name">Jekyll</span><span class="b-row"><svg><rect width="9.5%" height="100%" rx="3"></rect></svg><span class="b-val">442 ms</span></span>
15 <span class="b-name">Astro</span><span class="b-row"><svg><rect width="100%" height="100%" rx="3"></rect></svg><span class="b-val">4,672 ms</span></span>
16 </div>
17
18 ## blog — six paragraphs, a list, a quote, a link
19
20 <div class="bench">
21 <span class="b-name">sqzass</span><span class="b-row"><svg><rect class="b-us" width="0.373%" height="100%" rx="3"></rect></svg><span class="b-val">25 ms</span></span>
22 <span class="b-name">Hugo</span><span class="b-row"><svg><rect width="1.7%" height="100%" rx="3"></rect></svg><span class="b-val">112 ms</span></span>
23 <span class="b-name">Zola</span><span class="b-row"><svg><rect width="2.6%" height="100%" rx="3"></rect></svg><span class="b-val">172 ms</span></span>
24 <span class="b-name">Jekyll</span><span class="b-row"><svg><rect width="11.2%" height="100%" rx="3"></rect></svg><span class="b-val">752 ms</span></span>
25 <span class="b-name">Astro</span><span class="b-row"><svg><rect width="100%" height="100%" rx="3"></rect></svg><span class="b-val">6,699 ms</span></span>
26 </div>
27
28 ## heavy, repeated code — five identical 20-line Rust blocks per page
29
30 <div class="bench">
31 <span class="b-name">sqzass</span><span class="b-row"><svg><rect class="b-us" width="0.85%" height="100%" rx="3"></rect></svg><span class="b-val">187 ms</span></span>
32 <span class="b-name">Hugo</span><span class="b-row"><svg><rect width="16.1%" height="100%" rx="3"></rect></svg><span class="b-val">3,559 ms</span></span>
33 <span class="b-name">Zola</span><span class="b-row"><svg><rect width="23%" height="100%" rx="3"></rect></svg><span class="b-val">5,084 ms</span></span>
34 <span class="b-name">Jekyll</span><span class="b-row"><svg><rect width="49.1%" height="100%" rx="3"></rect></svg><span class="b-val">10,850 ms</span></span>
35 <span class="b-name">Astro</span><span class="b-row"><svg><rect width="100%" height="100%" rx="3"></rect></svg><span class="b-val">22,090 ms</span></span>
36 </div>
37
38 ## heavy, unique code — five distinct 20-line Rust blocks per page
39
40 <div class="bench">
41 <span class="b-name">sqzass</span><span class="b-row"><svg><rect class="b-us" width="5.4%" height="100%" rx="3"></rect></svg><span class="b-val">1,298 ms</span></span>
42 <span class="b-name">Hugo</span><span class="b-row"><svg><rect width="24.7%" height="100%" rx="3"></rect></svg><span class="b-val">5,912 ms</span></span>
43 <span class="b-name">Zola</span><span class="b-row"><svg><rect width="28.3%" height="100%" rx="3"></rect></svg><span class="b-val">6,789 ms</span></span>
44 <span class="b-name">Jekyll</span><span class="b-row"><svg><rect width="47.8%" height="100%" rx="3"></rect></svg><span class="b-val">11,456 ms</span></span>
45 <span class="b-name">Astro</span><span class="b-row"><svg><rect width="100%" height="100%" rx="3"></rect></svg><span class="b-val">23,958 ms</span></span>
46 </div>
47
48 ## Every number
49
50 Wall clock, median of three cold runs, and peak RSS.
51
52 | | minimal | blog | heavy · repeat | heavy · unique |
53 |---|---|---|---|---|
54 | **sqzass 0.1.0** | **18 ms** · 15 MB | **25 ms** · 24 MB | **187 ms** · 229 MB | **1,298 ms** · 439 MB |
55 | Hugo 0.164.0 | 93 ms · 123 MB | 112 ms · 140 MB | 3,559 ms · 411 MB | 5,912 ms · 421 MB |
56 | Zola 0.22.1 | 141 ms · 136 MB | 172 ms · 142 MB | 5,084 ms · 269 MB | 6,789 ms · 279 MB |
57 | Jekyll 4.4.1 | 442 ms · 56 MB | 752 ms · 62 MB | 10,850 ms · 174 MB | 11,456 ms · 182 MB |
58 | Astro 5.18.2 | 4,672 ms · 555 MB | 6,699 ms · 604 MB | 22,090 ms · 2,578 MB | 23,958 ms · 2,607 MB |
59
60 ## Why heavy comes twice
61
62 Because code repetition decides rankings, and most benchmarks do not say what
63 theirs is. sqzass highlights each distinct block once per build, so a corpus
64 whose generator repeats the same block is a different measurement from one
65 where every block is unique — the gap between 187 ms and 1,298 ms *is* that
66 variable. A single "heavy" number that does not state its repetition has
67 hidden the thing that produced it.
68
69 ## Method
70
71 - **Cold.** Before every run the output directory and each tool's caches are
72 removed — `.jekyll-cache`, Astro's `cacheDir` and `dist`, Hugo's `resources`
73 and build lock. Wall clock and peak RSS come from GNU time.
74 - **Corpus.** 1,000 pages plus a section index. The markdown *bodies* are
75 byte-identical across tools; only the front matter syntax differs.
76 A paragraph is one fixed 76-character sentence repeated four times.
77 - **Highlighting is on everywhere**, at build time, as each tool ships it:
78 syntect + Oniguruma (sqzass), Chroma (Hugo), Giallo (Zola), Rouge (Jekyll),
79 Shiki (Astro). Markup granularity differs — spans on the same heavy page:
80 sqzass 3,205 · Jekyll 1,800 · Zola and Astro 1,700 · Hugo 600. sqzass emits
81 the most detailed markup of the five *and* the numbers above.
82 - **Templates.** Each tool gets the same minimal no-theme layout: an HTML
83 shell around the rendered content.
84 - **Astro's time includes Node startup** (~1 s). It is also doing more than
85 markdown-to-HTML — it is a component framework. That is the honest caveat;
86 the corpus is plain markdown, which is the workload this page is about.