sidorares/node-mysql2 — pull request #137 by sidorares (2014-12-16 14:10:42+00:00)
Title: performance optimisations

few performance optimisations.

Buffer to string conversion is expensive, so column parser now only reads column name immediately and for other properties buffer offset is captured and getter reads string on access

also readLengthCodedInt hottest path moved to separate function - this seems to help inline it - 2-3% improvement in speed.

Benchmark using "select * from mysql.user" query ( 100000 times with "limit 1" + 50000 times "limit 2" + "33330" limit 3:

(total time in seconds, less is better)
Before: node v0.10.32, iojs 823cd54c8c16732b4a9c00ed48f911cb981359c2
64s node, 38s iojs

After:
42s node, 37s iojs

node-mysql on the same benchmark:

84s node, 80s iojs