perf(libquickjs-sys): compile QuickJS at -O2 (was -O0 since 2021 bring-up)#6
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.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.-O2matches 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_RunGCin the hand-curated no_std binding surface (both are real exported symbols in libquickjs.a).🤖 Generated with Claude Code