Re:A pure Go embedded SQL database
by throwaway894345 on Saturday January 29, 2022 @07:36PM
(#30132274)
Agreed. I wouldn't be surprised if a pure-Go alternative would be slower. Someone remarked upthread that the same author wrote a C-to-Go transpiler specifically to make a pure-Go sqlite and it was (somewhat unsurprisingly) considerably slower than the CGo version. It's possible (and to an extent, likely) that the transpolar was generating suboptimal Go code, but I would wager that a hand-written version would also be slower.
A query may do a lot of work but iterating over many results could be very slow.
For sqlite it might not matter too much, since any query does quite a bit of work.