Add a sqlite3 benchmark#308
Merged
fitzgen merged 2 commits intobytecodealliance:mainfrom Apr 28, 2026
Merged
Conversation
Member
Author
|
FWIW, the "benchmarks" CI job is failing on |
posborne
approved these changes
Apr 27, 2026
A WebAssembly build of SQLite's official `speedtest1.c` benchmark program, ported from [JetStream 3](https://github.com/WebKit/JetStream/tree/main/sqlite3) for use with Sightglass. Quoting from [its description](https://sqlite.org/cpu.html): > This program strives to exercise the SQLite library in a way that is typical > of real-world applications. Of course, every application is different, and so > no test program can exactly mirror the behavior of all applications. Since SQLite is a very widely used database and provides an official and popular upstream WebAssembly port, this is a realistic, larger WebAssembly program. Originally built from SQLite 3.48.0 with Emscripten SDK 3.1.73. The original JetStream 3 module was compiled by Emscripten and paired with a JavaScript driver. Since sightglass does not use JavaScript, the module was modified to: - Remove Emscripten `"env"` imports and replace them with stubs (except `emscripten_resize_heap`, which delegates to `memory.grow`). - Add `"bench" "start"` and `"bench" "end"` imports for Sightglass timing. - Add a `"_start"` export that calls `__wasm_call_ctors`, `bench.start`, `wasm_main`, and `bench.end`. - Execute the sqlite3 benchmarks with `szTest=25` instead of `szTest=100`, bringing a default run under Sightglass from ~4 minutes to ~1 minute.
6061781 to
d6e434d
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.
A WebAssembly build of SQLite's official
speedtest1.cbenchmark program, ported from JetStream 3 for use with Sightglass.Quoting from its description:
Since SQLite is a very widely used database and provides an official and popular upstream WebAssembly port, this is a realistic, larger WebAssembly program.
Originally built from SQLite 3.48.0 with Emscripten SDK 3.1.73.
The original JetStream 3 module was compiled by Emscripten and paired with a JavaScript driver. Since sightglass does not use JavaScript, the module was modified to:
"env"imports and replace them with stubs (exceptemscripten_resize_heap, which delegates tomemory.grow)."bench" "start"and"bench" "end"imports for Sightglass timing."_start"export that calls__wasm_call_ctors,bench.start,wasm_main, andbench.end.szTest=25instead ofszTest=100, bringing a default run under Sightglass from ~4 minutes to ~1 minute.