Skip to content

Instantly share code, notes, and snippets.

@jackc
Last active August 29, 2015 14:03
Show Gist options
  • Save jackc/c402b42244d3390f26c6 to your computer and use it in GitHub Desktop.
Save jackc/c402b42244d3390f26c6 to your computer and use it in GitHub Desktop.
go_db_benchmark results
# Run on a Core i7 4770, 16GB, Samsung 840 SSD
jack@edi:~/dev/go/src/github.com/jackc/go_db_bench$ uname -a
Linux edi 3.13.0-30-generic #55-Ubuntu SMP Fri Jul 4 21:40:53 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
jack@edi:~/dev/go/src/github.com/jackc/go_db_bench$ GO_DB_BENCH_PG_HOST=/var/run/postgresql go test -test.bench=. -test.benchmem -test.benchtime=5s
testing: warning: no tests to run
PASS
BenchmarkPgxNativeSelectSingleValueUnprepared 200000 49210 ns/op 304 B/op 9 allocs/op
BenchmarkPgxStdlibSelectSingleValueUnprepared 200000 56198 ns/op 627 B/op 21 allocs/op
BenchmarkPgSelectSingleValueUnprepared 100000 61146 ns/op 218 B/op 9 allocs/op
BenchmarkPqSelectSingleValueUnprepared 100000 84663 ns/op 1036 B/op 29 allocs/op
BenchmarkPgxNativeSelectSingleValuePrepared 200000 28481 ns/op 108 B/op 4 allocs/op
BenchmarkPgxStdlibSelectSingleValuePrepared 500000 30977 ns/op 516 B/op 21 allocs/op
BenchmarkPgSelectSingleValuePrepared 200000 28747 ns/op 118 B/op 5 allocs/op
BenchmarkPqSelectSingleValuePrepared 500000 33706 ns/op 663 B/op 23 allocs/op
BenchmarkRawSelectSingleValuePrepared 500000 21142 ns/op 0 B/op 0 allocs/op
BenchmarkPgxNativeSelectSingleRowUnprepared 200000 78815 ns/op 1069 B/op 21 allocs/op
BenchmarkPgxStdlibSelectSingleRowUnprepared 100000 92366 ns/op 1828 B/op 37 allocs/op
BenchmarkPgSelectSingleRowUnprepared 100000 74305 ns/op 866 B/op 26 allocs/op
BenchmarkPqSelectSingleRowUnprepared 100000 105567 ns/op 2017 B/op 48 allocs/op
BenchmarkPgxNativeSelectSingleRowPrepared 500000 32121 ns/op 218 B/op 5 allocs/op
BenchmarkPgxStdlibSelectSingleRowPrepared 200000 41183 ns/op 1056 B/op 26 allocs/op
BenchmarkPgSelectSingleRowPrepared 200000 43649 ns/op 453 B/op 14 allocs/op
BenchmarkPqSelectSingleRowPrepared 200000 48943 ns/op 1378 B/op 37 allocs/op
BenchmarkRawSelectSingleRowPrepared 500000 23256 ns/op 0 B/op 0 allocs/op
BenchmarkPgxNativeSelectMultipleRowsUnprepared 50000 289041 ns/op 13799 B/op 144 allocs/op
BenchmarkPgxStdlibSelectMultipleRowsUnprepared 50000 374134 ns/op 20369 B/op 303 allocs/op
BenchmarkPgSelectMultipleRowsUnprepared 20000 386107 ns/op 11559 B/op 338 allocs/op
BenchmarkPqSelectMultipleRowsUnprepared 50000 375961 ns/op 26526 B/op 473 allocs/op
BenchmarkPgxNativeSelectMultipleRowsPrepared 100000 130355 ns/op 11365 B/op 68 allocs/op
BenchmarkPgxStdlibSelectMultipleRowsPrepared 100000 147837 ns/op 17986 B/op 232 allocs/op
BenchmarkPgSelectMultipleRowsPrepared 50000 241844 ns/op 11150 B/op 326 allocs/op
BenchmarkPqSelectMultipleRowsPrepared 50000 230397 ns/op 25889 B/op 462 allocs/op
BenchmarkRawSelectMultipleRowsPrepared 200000 43388 ns/op 0 B/op 0 allocs/op
ok github.com/jackc/go_db_bench 340.569s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment