Skip to content

Commit 5e4d3fd

Browse files
natemoo-reclaude
andcommitted
fix(perf): build input.wasm with -O2 not -Oz
The opt-flags split defaulted input.wasm to -Oz (optimize for size), which ~2x'd instruction counts on the hot parse paths (multi-byte UTF-8 decode, Kitty CSI-u trie). CodSpeed flagged UTF-8 3/4-byte and Kitty regressions on PR #37. -O2 restores parse speed for +1557 bytes raw / +290 bytes gzip on a 9KB module — a negligible size cost. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 51f4d26 commit 5e4d3fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CFLAGS_BASE = --target=wasm32 -nostdlib \
55
-mbulk-memory \
66
-Isrc -I.
77

8-
INPUT_OPT ?= -Oz
8+
INPUT_OPT ?= -O2
99
LAYOUT_OPT ?= -O2
1010

1111
LAYOUT_CFLAGS = $(CFLAGS_BASE) $(LAYOUT_OPT) -DCLAY_IMPLEMENTATION -DCLAY_WASM

0 commit comments

Comments
 (0)