Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
only reset sqlite3 statement when necessary
This commit changes the bind logic to only reset the sqlite3 statement when necessary, which saves us a call to sqlite3_reset the first time the query is used. goos: darwin goarch: arm64 pkg: github.com/charlievieth/go-sqlite3 cpu: Apple M4 Pro │ y1.txt │ y2.txt │ │ sec/op │ sec/op vs base │ Suite/BenchmarkQuery-14 1.718µ ± 1% 1.634µ ± 0% -4.89% (p=0.000 n=10) Suite/BenchmarkQuerySimple-14 1009.0n ± 2% 941.1n ± 0% -6.73% (p=0.000 n=10) geomean 1.317µ 1.240µ -5.81% │ y1.txt │ y2.txt │ │ B/op │ B/op vs base │ Suite/BenchmarkQuery-14 640.0 ± 0% 640.0 ± 0% ~ (p=1.000 n=10) ¹ Suite/BenchmarkQuerySimple-14 440.0 ± 0% 440.0 ± 0% ~ (p=1.000 n=10) ¹ geomean 530.7 530.7 +0.00% ¹ all samples are equal │ y1.txt │ y2.txt │ │ allocs/op │ allocs/op vs base │ Suite/BenchmarkQuery-14 22.00 ± 0% 22.00 ± 0% ~ (p=1.000 n=10) ¹ Suite/BenchmarkQuerySimple-14 13.00 ± 0% 13.00 ± 0% ~ (p=1.000 n=10) ¹ geomean 16.91 16.91 +0.00% ¹ all samples are equal
- Loading branch information