Benchmarks
Estimated reading time: 2 minutesKita Html is a string builder. The most representative way to measure its performance is through micro benchmarks that compare string generation speed against other HTML builders.
Results
Benchmarked on a 13th Gen Intel Core i5-13600K (~4.80 GHz) running Node.js v24.13.0 on
2026-02-23. Run pnpm bench in the repository root to reproduce.
RealWorldPage (170.5 KiB output)
Libraries marked "different output" produce HTML that differs from React's output for the same input. Libraries marked "template engine" lack JSX syntax, so they have no per-call function overhead and produce a larger output for the same logical content.
Methodology
The RealWorldPage benchmark is the most meaningful, as it represents a realistic workload scenario with a full component tree. Template engines such as Ghtml and HonoHtml have an inherent advantage: with no function call per element and no JSX transform, they trade away syntax highlighting and editor intellisense. The JSX-based results reflect the actual cost incurred by any JSX library.
Why it is fast
The performance comes from the string-only architecture. There is no object tree
construction, no diffing, and no serialization step. The runtime uses
character-by-character loops for HTML escaping instead of regex replacements, checks
before converting (regex test before expensive operations), and orders void element checks
by frequency. When running on Bun, the runtime delegates escaping to Bun's native
escapeHTML implementation.