better-sqlite3 icon indicating copy to clipboard operation
better-sqlite3 copied to clipboard

Performance numbers might not be representitive or are outdated

Open tobyhinloopen opened this issue 2 years ago • 4 comments

https://github.com/WiseLibs/better-sqlite3/blob/HEAD/docs/benchmark.md

The performance difference measured on my machine is much greater!

hinloopen@7950X:~/Projects/better-sqlite3$ node benchmark/
--- reading rows individually ---
better-sqlite3 x 597,935 ops/sec ±0.21%
node-sqlite3   x 9,086 ops/sec ±0.27%

--- reading 100 rows into an array ---
better-sqlite3 x 17,584 ops/sec ±0.19%
node-sqlite3   x 4,493 ops/sec ±0.3%

--- iterating over 100 rows ---
better-sqlite3 x 15,393 ops/sec ±0.14%
node-sqlite3   x 95 ops/sec ±0.59%

--- inserting rows individually ---
better-sqlite3 x 56,636 ops/sec ±9.38%
node-sqlite3   x 9,711 ops/sec ±4.01%

--- inserting 100 rows in a single transaction ---
better-sqlite3 x 6,715 ops/sec ±6.82%
node-sqlite3   x 54 ops/sec ±4.77%

All benchmarks complete!
hinloopen@7950X:~/Projects/better-sqlite3$ node --version
v20.10.0

7950X 64GB RAM 2TB 980 Pro SSD Node 20.10.0node Ubuntu 22 in WSL Win 11

I'm sorry for the bad title - I just wanted to share this 🙃

tobyhinloopen avatar Dec 20 '23 09:12 tobyhinloopen

Hooray!

JoshuaWise avatar Apr 03 '24 04:04 JoshuaWise

Maybe create a pr with your latest results? Since the current results are from 2020.

melroy89 avatar May 04 '24 18:05 melroy89

@JoshuaWise

--- iterating over 100 rows ---
better-sqlite3 x 15,393 ops/sec ±0.14%
node-sqlite3   x 95 ops/sec ±0.59%

Why ?

houd1ni avatar May 04 '24 19:05 houd1ni

better-sqlite3 x 15,393 ops/sec ±0.14% node-sqlite3 x 95 ops/sec ±0.59%

If that is true, this is a 162 times improvement 😮 . But yea, plz update the benchmark results anyway.

melroy89 avatar May 05 '24 12:05 melroy89