cvilsmeier / go-sqlite-bench

Benchmarks for Golang SQLite Drivers
The Unlicense
245 stars 7 forks source link

Update zombiezen driver to v1.1.0 #6

Closed ffmiruz closed 5 months ago

ffmiruz commented 5 months ago

zombiezen.com/go/sqlite v1.1.0 has improvement for string conversion. In context of this benchmark, fixed the outlier performance for Large case.

cvilsmeier commented 5 months ago

Thank you, I will update all drivers to their new versions when I re-run the benchmark next time.

ncruces commented 5 months ago

Meanwhile I've updated my fork, which should give you an idea of the expected results.

gedw99 commented 5 months ago

Meanwhile I've updated my fork, which should give you an idea of the expected results.

@ncruces thats a huge performance leap. Well done.

ncruces commented 5 months ago

@ncruces thats a huge performance leap. Well done.

If you mean the zombiezen improvement, that's not my work. @ffmiruz takes the credit. 😆

If you mean improvements to my driver, this PR is responsible for the bulk of the improvement (this time around). I bet a similar approach would help other database/sql drivers.

A similar approach to binding values might improve insert performance. I'll evaluate it in the future against increased complexity.

The rest is profiling, and focusing on reducing allocations in the hot path (the low level APIs benefit because database/sql itself generates some garbage).

My low level API does better than my database/sql driver, but I'm not sure it's appropriate for me to overwhelm the benchmark with two implementations of my own. Most people seem to prefer the database/sql abstraction.