Wow definitely improved!
Still not beating Go-MySQL-Driver on my setup though (usual best-of-2
mode). The results are below.
My turn to optimize now ;)
The JDBC results for (Simple|Prepared)Query made me think. I'm also
reworking my stream I/O right now.
I'll run another benchmark-round soon. Feel free to contribute to the
benchmark suite.
SimpleQuery:
Go-MySQl-Driver 3923 | mymysql 3216 queries/second
PreparedQuery:
Go-MySQl-Driver 3716 | mymysql 4122 queries/second <- wow!
AutoQueryRow:
Go-MySQl-Driver 7748 | mymysql 6855 queries/second
SimpleQueryRow:
Go-MySQl-Driver 15075 | mymysql 6970 queries/second
PreparedQueryRow:
Go-MySQl-Driver 15539 | mymysql 14238 queries/second
SimpleExec:
Go-MySQl-Driver 29238 | mymysql 27306 queries/second
PreparedExec:
Go-MySQl-Driver 30384 | mymysql 28295 queries/second
Log:
*************************************************************
BENCHMARKING mymysql godrv [run 1]
*************************************************************
-------------------------------------------------------------
[10000 * Query 100 Rows]
-------------------------------------------------------------
SimpleQuery: 3.2581864s [ 3069 queries/second ]
PreparedQuery: 2.4971428s [ 4005 queries/second ]
-------------------------------------------------------------
[100 * QueryRow] * 1000
-------------------------------------------------------------
AutoQueryRow: 14.5888344s [ 6855 queries/second ]
SimpleQueryRow: 14.3458205s [ 6971 queries/second ]
PreparedQueryRow: 7.0234017s [ 14238 queries/second ]
-------------------------------------------------------------
[100000 * Exec]
-------------------------------------------------------------
SimpleExec: 3.6622094s [ 27306 queries/second ]
PreparedExec: 3.5452028s [ 28207 queries/second ]
*************************************************************
BENCHMARKING mymysql godrv [run 2]
*************************************************************
-------------------------------------------------------------
[10000 * Query 100 Rows]
-------------------------------------------------------------
SimpleQuery: 3.1091778s [ 3216 queries/second ]
PreparedQuery: 2.4261387s [ 4122 queries/second ]
-------------------------------------------------------------
[100 * QueryRow] * 1000
-------------------------------------------------------------
AutoQueryRow: 14.7788453s [ 6766 queries/second ]
SimpleQueryRow: 14.3478206s [ 6970 queries/second ]
PreparedQueryRow: 7.1074065s [ 14070 queries/second ]
-------------------------------------------------------------
[100000 * Exec]
-------------------------------------------------------------
SimpleExec: 3.776216s [ 26482 queries/second ]
PreparedExec: 3.5342021s [ 28295 queries/second ]
On Friday, March 1, 2013 1:30:26 AM UTC+1, ziutek wrote:
Thanks for your work!
Your benchmark has clearly showed that I need to optimize mymysql. The
optimization was:
1. Reducing a number of allocations in protocol handling code.
2. Remove using of reflection in godrv.
3. Implement driver.Execer
After that Go-MySQL-Driver and mymysql/godrv benchmarks are more
similar.
There are my results (queries/second):
SimpleQuery
godrv: 2017 Go-MySQL: 1764
PreparedQuery
godrv: 2527 Go-MySQL: 1989
AutoQueryRow
godrv: 5514 Go-MySQL: 5802
SimpleQueryRow
godrv: 5668 Go-MySQL: 5910
PreparedQueryRow
godrv: 12491 Go-MySQL: 13201
SimpleExec
godrv: 16346 Go-MySQL: 16120
PreparedExec:
godrv: 17337 Go-MySQL: 16459
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[email protected].
For more options, visit
https://groups.google.com/groups/opt_out.