$ go test -bench=.
cpu: Intel(R) Core(TM) i5-4590S CPU @ 3.00GHz
Benchmark_Zombiezen/Queries-4 149104 7141 ns/op
Benchmark_Mattn/Queries-4 269184 4256 ns/op
ok git.jlel.se/jlelse/GoSqliteBench 3.274s
Am I doing something wrong? Why is this library so much slower?
Your benchmark seems like it's a pretty direct comparison in operations. I'd be curious to see whether it makes a difference to move the dbpool.Get outside the loop: that would help narrow down whether it's a slowness with the pool or whether it's coming from modernc.org/sqlite.
You may be interested in looking at the upstream performance issues: