Files
turso/bindings/wasm/perf
Pekka Enberg 60cc8c0347 bindings/wasm: "SELECT 1" benchmark
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
```
2024-11-16 13:10:23 +02:00
..