Removing Function.bind() also helped to save 10-20% couple of times. De-framer stream to packets does not buffer incoming data and in most cases executes parser on incoming chunk without copying.
150k insert+select
Results (init time in seconds, other values in ops/s):
module,init,escapes,inserts,selects
===================================
C,1.009,6790961,1728,299671
PHP,0.014,1501147,1632,209946
mysql,0.022,674157,1369,89074
mysql2,0.02,691882,1467,340909
mysql-libmysqlclient,0.017,1570681,1721,142315
mysql-native,0.02,0,1503,199734
mariasql,0.013,1662971,1594,282486
500k inserts + select
Results (init time in seconds, other values in ops/s):
module,init,escapes,inserts,selects
===================================
C,0.021,6809424,1696,340689
PHP,0.021,1499440,1655,206863
mysql,0.035,705799,0,0
mysql2,0.024,690131,1512,384911
mysql-libmysqlclient,0.031,1860465,1569,161290
mysql-native,0.028,0,1445,187829
mariasql,0.029,1392434,1594,257467
I definitely interested to see more real life benchmarks.