mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-24 11:34:21 +01:00
This adds a benchmark for "SELECT 1" that essentially just evaluates the overhead of calling into the library. Looks like WebAssembly adds 2.5x overhead compared to native code... ``` penberg@vonneumann perf % node perf-limbo.js cpu: Apple M1 runtime: node v18.19.0 (arm64-darwin) benchmark time (avg) (min … max) p75 p99 p999 ------------------------------------------------- ----------------------------- • Statement ------------------------------------------------- ----------------------------- SELECT 1 771 ns/iter (624 ns … 2'183 µs) 750 ns 1'085 ns 1'750 ns summary for Statement SELECT 1 penberg@vonneumann perf % node perf-better-sqlite3.js cpu: Apple M1 runtime: node v18.19.0 (arm64-darwin) benchmark time (avg) (min … max) p75 p99 p999 ------------------------------------------------- ----------------------------- • Statement ------------------------------------------------- ----------------------------- SELECT 1 302 ns/iter (166 ns … 779 µs) 292 ns 375 ns 1'000 ns summary for Statement SELECT 1 ``` Reviewed-by: Pere Diaz Bou <pere-altea@homail.com> Closes #394