Repository navigation
Conversation
Rebuild with Emscripten 6.0.13 (was 3.1.73). SQLite stays at 3.48.0 and benchmark.js is unchanged, so the benchmark runs the same SQL as before. - Emscripten 4.0 made the MODULARIZE factory async, which runs SQLite 3.48's --post-js init too late: EmscriptenModule.sqlite3 stays undefined, and the shells fail with "Cannot set properties of undefined (setting 'scriptInfo')". emscripten-4-post-load-init.patch backports Module.runSQLite3PostLoadInit from SQLite 3.49.0. It changes only the JS glue. Drop it when updating to SQLite 3.49.0 or later. - Pass INCOMING_MODULE_JS_API through EMCC_CFLAGS, since Emscripten 6.0.2 removed wasmBinary from the default list. speedtest1.wasm now uses bulk memory (271 memory.copy, 217 memory.fill). Score change, d8 (15.9.60) / jsc (325217) / SpiderMonkey (160.0b3) (each test alone in a fresh shell, 6 rounds): +15.2% / -0.2% / +11.7%. Part of WebKit#277.
✅ Deploy Preview for webkit-jetstream-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Update SQLite from 3.48.0 to 3.54.1, still built with emcc 6.0.13. SQLite 3.49.0 and later work with Emscripten 4 and newer, so the backport patch is gone. benchmark.js now passes "--testset main". Since SQLite 3.50, the default testset is the "mix1" list, kept in a static buffer that speedtest1 tokenizes in place. JetStream calls main() repeatedly in one instance, so only the first iteration would run all 8 testsets of mix1, and every later iteration would run only "main". With the flag, every iteration runs the "main" testset, as with 3.48. `make dist` no longer builds speedtest1, so build.sh builds that target: - Run `make sqlite3.c` first. ext/wasm/GNUmakefile stops if sqlite3.h is out of date. - Pass `CC="cc -DSQLITE_DISABLE_INTRINSIC"` so the host c-pp preprocessor links on Linux without `-lm` (speedtest1.wasm is built by emcc, not CC). - WASM_CUSTOM_INSTANTIATE=0 uses Emscripten's loader instead of SQLite's fetch()-based one, which JS shells lack. - emcc_opt=-Oz is the level `make dist` used. Without it, speedtest1 builds at -O0. - bin.wasm-opt= skips SQLite's extra `wasm-opt --all-features` pass, which makes Binaryen v133 emit compact imports that engines reject. speedtest1.wasm grows from 862,092 to 960,233 bytes: 3.54.1 exports 71 more C functions, and speedtest1.c has new testsets (json, star) that "main" does not run. Score change against the 3.48.0 build, d8 / jsc / SpiderMonkey (each test alone in a fresh shell, 10 rounds): +1.8% / +1.1% / -2.5%. The first iteration is slower on all three (-3.6% / -5.8% / -6.9%); the average iteration is faster on d8 and jsc (+7.5% / +6.4%) and level on SpiderMonkey (-0.9%). Part of WebKit#277.
danleh
force-pushed
the
wasm-sqlite-3.54
branch
from
November 3, 2026 22:10
544a8b4 to
8c7e756
Compare
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.
Part of #277. Stacked on #327 so the SQLite library update can be reviewed separately from the Emscripten 6.0.13 compiler rebuild; only the second commit is new.
Update SQLite from 3.48.0 to 3.54.1, built with Emscripten 6.0.13. SQLite 3.49.0 and later work with Emscripten 4 and newer (
Module.runSQLite3PostLoadInit), so the backport patch from #327 goes away.To review (3 files, +20/−46):
benchmark.jspasses--testset main. Since SQLite 3.50, speedtest1's default testset is the "mix1" list, kept in a static buffer that speedtest1 tokenizes in place. JetStream callsmain()repeatedly in one instance, so only the first iteration would run all 8 testsets of mix1, and every later one only "main". With the flag, every iteration runs "main", as with 3.48.build.sh:make distno longer builds speedtest1, sobuild.shbuilds that target. It runsmake sqlite3.cfirst, passesCC="cc -DSQLITE_DISABLE_INTRINSIC"(so the hostc-pppreprocessor links on Linux without-lm), and setsWASM_CUSTOM_INSTANTIATE=0(Emscripten's loader instead of SQLite'sfetch()-based one),emcc_opt=-Oz(the levelmake distused) andbin.wasm-opt=(skips SQLite's extrawasm-opt --all-featurespass, after which Binaryen v133 emits compact imports that engines reject).Binaries:
speedtest1.wasmgrows from 862,092 to 960,233 bytes: 3.54.1 exports 71 more C functions, and speedtest1.c has new testsets (json, star) that "main" does not run.Scores (each test alone in a fresh shell; 10 rounds against #327, 6 rounds against
main):d8jscmain(3.48.0 + emcc 3.1.73)d8First / AveragejscFirst / AverageAgainst #327, the first iteration (which compiles and instantiates the 11.4% larger module inside
runIteration) is slower on all three shells, while later iterations are faster ond8(+7.5%) andjsc(+6.4%) and flat on SpiderMonkey (−0.9%).