Skip to content

perf(libquickjs-sys): compile QuickJS at -O2 (was -O0 since 2021 bring-up)#6

Merged
doodlewind merged 1 commit into
masterfrom
perf/interpreter-o2
Jul 20, 2026
Merged

perf(libquickjs-sys): compile QuickJS at -O2 (was -O0 since 2021 bring-up)#6
doodlewind merged 1 commit into
masterfrom
perf/interpreter-o2

Conversation

@doodlewind

Copy link
Copy Markdown
Collaborator

.opt_level(0) has been in the cc build since the October 2021 PSP cross-compile experiments (commit 1b78538, alongside the commented-out clang/mips hacks) — every consumer has been running an unoptimized interpreter dispatch loop for five years. -O2 matches the official QuickJS Makefile.

Measured on a real PSP (333 MHz MIPS, soft-float f64) as part of pocket-stack/pocketjs#85's hardware perf spike: the interpreter lands at ~1.7µs per op at -O2; PPSSPP e2e goldens in pocketjs stay byte-exact, so JS semantics are unchanged.

Also exposes JS_SetGCThreshold / JS_RunGC in the hand-curated no_std binding surface (both are real exported symbols in libquickjs.a).

🤖 Generated with Claude Code

…g-up)

The cc build has carried .opt_level(0) since the October 2021 PSP
cross-compile experiments — every host has been running an unoptimized
interpreter dispatch loop. -O2 matches the official QuickJS Makefile.

Also expose JS_SetGCThreshold / JS_RunGC in the hand-curated no_std
binding surface (real exported symbols in libquickjs.a).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant