Closed maradotwebp closed 1 year ago
I fixed an issue with the benchmark displaying incorrect results because errors were swallowed. With the fixed benchmarks, it looks much more realistic:
blinkdb\insert-many.ts --- lokijs is 1.08x faster than blinkdb
┌─────────┬───────────┬────────────────────┬────────────────────┬───────────┬─────────┐
│ (index) │ name │ ops/sec │ Average Time (ns) │ Margin │ Samples │
├─────────┼───────────┼────────────────────┼────────────────────┼───────────┼─────────┤
│ 0 │ 'lokijs' │ 291.5321492067237 │ 3430153.4246602287 │ '±6.94%' │ 146 │
│ 1 │ 'blinkdb' │ 270.58441059913207 │ 3695704.4117426607 │ '±11.84%' │ 136 │
└─────────┴───────────┴────────────────────┴────────────────────┴───────────┴─────────┘
blinkdb\upsert-many.ts --- lokijs is 1.44x faster than blinkdb
┌─────────┬───────────┬────────────────────┬────────────────────┬───────────┬─────────┐
│ (index) │ name │ ops/sec │ Average Time (ns) │ Margin │ Samples │
├─────────┼───────────┼────────────────────┼────────────────────┼───────────┼─────────┤
│ 0 │ 'lokijs' │ 276.56897678633635 │ 3615734.5325558735 │ '±6.06%' │ 139 │
│ 1 │ 'blinkdb' │ 191.67679458889793 │ 5217115.6250018 │ '±14.38%' │ 96 │
└─────────┴───────────┴────────────────────┴────────────────────┴───────────┴─────────┘
blinkdb\update.ts --- lokijs is 6.19x faster than blinkdb
┌─────────┬───────────┬────────────────────┬────────────────────┬───────────┬─────────┐
│ (index) │ name │ ops/sec │ Average Time (ns) │ Margin │ Samples │
├─────────┼───────────┼────────────────────┼────────────────────┼───────────┼─────────┤
│ 0 │ 'lokijs' │ 780488.9067911205 │ 1281.2481911003335 │ '±14.40%' │ 390245 │
│ 1 │ 'blinkdb' │ 126152.36584219857 │ 7926.922284207334 │ '±14.78%' │ 63193 │
└─────────┴───────────┴────────────────────┴────────────────────┴───────────┴─────────┘
I'm still looking if I can make insertMany
faster in some way.
The performance of insertMany
was massively increased in the latest release.
The
insertMany
is currently very slow in benchmarks. That doesn't seem very realistic.