{
	"source": "https://github.com/pierrecomputer/pierre/blob/d302ea0aad461a2a9ee6de5916e3482bced946e5/packages/highlights/benchmark/README.md#memory-usage",
	"provenance": "Transcribed from the Highlights benchmark README; not a new benchmark run. The README names no package version; its Wasm build, 170,853 bytes or 77,955 bytes gzipped, matches published Highlights 0.1.1.",
	"date": "2026-10-05",
	"environment": "Apple M4 Pro (14 cores, 48 GiB RAM, macOS 27.0.1 arm64); Bun 1.4.0; Highlights 0.1.1; Shiki 4.4.1",
	"machine": {
		"cpu": "Apple M4 Pro",
		"cores": 14,
		"memory": "48 GiB",
		"os": "macOS 27.0.1 arm64",
		"bun": "1.4.0"
	},
	"packages": {
		"highlights": {
			"version": "0.1.1",
			"wasmBytes": 170853,
			"wasmGzipBytes": 77955
		},
		"shiki": "4.4.1"
	},
	"aggregation": "median",
	"metric": "peak process RSS",
	"unit": "MiB",
	"samplesPerCase": 5,
	"processes": 120,
	"methodology": "Five new Bun processes per workload and engine, run in sequence with a different engine first in each round. Inputs are tiny.ts.txt, small.ts.txt, large.ts.txt, and large.ts.txt repeated ten times (5,289,410 bytes, 108,251 lines); each produces HTML and themed tokens in separate processes. Values are median peak process RSS through the first complete call, rounded to whole MiB, including the runtime, compiled code, Wasm, and allocator capacity. Both HTML APIs return complete strings; Highlights includes UTF-8 decoding. Both libraries use GitHub Dark. Highlights includes all built-in lexers; Shiki loads only TypeScript, with line-length and time limits disabled. Token boundaries and styles can differ.",
	"rows": [
		{
			"name": "2 KiB → HTML",
			"highlightsMiB": 37,
			"shikiJsMiB": 80,
			"shikiWasmMiB": 148
		},
		{
			"name": "2 KiB → tokens",
			"highlightsMiB": 37,
			"shikiJsMiB": 78,
			"shikiWasmMiB": 147
		},
		{
			"name": "31 KiB → HTML",
			"highlightsMiB": 38,
			"shikiJsMiB": 91,
			"shikiWasmMiB": 181
		},
		{
			"name": "31 KiB → tokens",
			"highlightsMiB": 41,
			"shikiJsMiB": 91,
			"shikiWasmMiB": 171
		},
		{
			"name": "517 KiB → HTML",
			"highlightsMiB": 50,
			"shikiJsMiB": 155,
			"shikiWasmMiB": 349
		},
		{
			"name": "517 KiB → tokens",
			"highlightsMiB": 55,
			"shikiJsMiB": 112,
			"shikiWasmMiB": 303
		},
		{
			"name": "5 MiB → HTML",
			"highlightsMiB": 104,
			"shikiJsMiB": 739,
			"shikiWasmMiB": 963
		},
		{
			"name": "5 MiB → tokens",
			"highlightsMiB": 133,
			"shikiJsMiB": 326,
			"shikiWasmMiB": 488
		}
	]
}
