Sub-40ms Reporting: SIMD, Zero Retention, and Bit-Exact Output

Published: November 16, 2026
erd-report performance simd architecture
Most reporting engines rely on heavy runtimes, browser pools, or disk-backed virtualizers to produce documents. That works, until you need synchronous responses or predictable memory usage under load.
ERD-Report takes a different approach. The entire engine — parsing, layout, pagination, expression evaluation, font shaping, and rendering — is written in native C++ with no virtual machine and no third-party runtime dependencies.
Why CPU-only and SIMD
Rendering runs purely on the CPU through a custom-optimized Skia backend. Avoiding the GPU is a deliberate architectural choice: GPU drivers and hardware generations introduce subtle floating-point and anti-aliasing differences.
By keeping everything on the CPU with deterministic IEEE-754 arithmetic and bundled fonts, the engine produces bit-identical output bytes across every platform — whether running on Linux, macOS, Windows, WebAssembly in the browser and even on ESP32-P4.
To make CPU rendering fast enough for synchronous API requests, hot paths across rasterization, color conversion, and encoding use runtime CPU dispatch:
  • AVX2 where wider vector registers pay off on larger buffers.
  • SSE for shorter runs and string/markup operations where 256-bit setup overhead costs more than it saves.
  • Automatic fallback based on CPUID, keeping binaries portable across server generations without recompilation.
Measured performance
The engine runs as a single static binary (erd-report-render), started fresh per request with input read from stdin and output streamed to stdout. Nothing is written to disk.
Measured end-to-end across 100 cold runs on a 2-page invoice (each run spawning a fresh process, parsing JSON5, resolving layout and fonts, and rendering):
Formatp50p95p99
PDF37 ms50 ms55 ms
DOCX33 ms42 ms48 ms
XLSX30 ms39 ms43 ms
Because each cold request finishes in roughly 30 to 40 milliseconds, applications do not need warm process pools, job queues, or polling endpoints. A synchronous HTTP request sends JSON5 data in and receives the finished document or printer job (ZPL, TSPL, EPL2, DYMO, or ESC/POS) directly.
Scaling to 1,000 pages
Startup overhead disappears on larger documents, where throughput and memory discipline matter most. Across a 1,000-page report:
Format2-page invoice1,000-page reportMemory profile (1,000 pages)
PDF38 ms6.0 s~600 MB
DOCX32 ms7.0 s~1,050 MB
XLSX30 ms5.0 s~590 MB
HTML194 ms6.9 s~590 MB
HTML carries a fixed upfront cost (~160 ms) for subsetting fonts with HarfBuzz and compressing them into self-contained WOFF2 data URIs. Once embedded, additional pages scale at the same rate as PDF and DOCX.
Memory grows linearly — roughly 0.6 MB per page for PDF, XLSX, and HTML, and 1.0 MB per page for page-faithful WordprocessingML — without garbage collection pauses or temporary files on disk.
Verifiable documents without storing files
Bit-exact determinism has a practical side effect beyond testing. Given the same template, input data, and print timestamp, every version of the engine produces the exact same output bytes.
Instead of archiving millions of generated PDFs, systems can store the source data alongside a SHA-256 hash of the rendered document — and re-render or verify the exact bytes on demand in milliseconds.

Back to Journal