Re:Show HN: I benchmarked six Go SQLite drivers (found you d...
by dave78 on Wednesday December 13, 2023 @08:41AM
(#38627182)
I hadn't heard of sqinn before. According to these benchmarks it beats Cgo-based solutions most of the time, which makes it a very interesting candidate. Anyone have real-world experience using it?
[ Parent
| on HN ]
Re:Show HN: I benchmarked six Go SQLite drivers (found you d...
by KomoD on Wednesday December 13, 2023 @09:03AM
(#38627467)
(Sqinn is made by the same guy that made these benchmarks in case you didn't realize)
Re:Show HN: I benchmarked six Go SQLite drivers (found you d...
by dave78 on Wednesday December 13, 2023 @09:36AM
(#38627921)
I did not notice that, thanks for pointing it out.
Re:Show HN: I benchmarked six Go SQLite drivers (found you d...
by cvilsmeier on Wednesday December 13, 2023 @09:50AM
(#38628141)
Yes, in fact the benchmark started out as a comparison between sqinn and mattn. (There was no modernc at that time.)
Re:Show HN: I benchmarked six Go SQLite drivers (found you d...
by cvilsmeier on Wednesday December 13, 2023 @09:10AM
(#38627582)
Sqinn author here. Yes, sqinn performs quite well compared to the 'standard' mattn driver. The only use case it clearly breaks down is when SELECTing very large (gigabytes) resultsets.
Re:Show HN: I benchmarked six Go SQLite drivers (found you d...
by microtherion on Wednesday December 13, 2023 @10:34AM
(#38628881)
That stood out to me as well. Any insights why sqinn and zombie underperform in this case, and is the problem inherent to their design?
Re:Show HN: I benchmarked six Go SQLite drivers (found you d...
by cvilsmeier on Wednesday December 13, 2023 @10:48AM
(#38629095)
For sqinn it's because of its design: Shuffling that much data over process boundaries takes time. For zombie, more pprof would be needed to explain the behaviour.
Re:Show HN: I benchmarked six Go SQLite drivers (found you d...
by ncruces on Wednesday December 13, 2023 @03:51PM
(#38633963)
I would suspect some unnecessary copying. Nothing else explains a “lower level” binding (zombie) performing worse than modernc.
My (WASM) binding also has a lower level API. But I worked hard to make database/sql work first class, so I wouldn't expect much improvement.