sidorares/node-mysql2 — pull request #109 by Mattijah (2014-06-10 18:41:44+00:00)
Title: SqlString - improved speed

Benchmarks:

**Format regular insert query**
Before: 362,899 ops/sec ±5.60% (86 runs sampled)
After: 611,534 ops/sec ±4.20% (86 runs sampled)

**Format bulk insert**
Before: 59,775 ops/sec ±6.43% (79 runs sampled)
After: 114,782 ops/sec ±5.58% (91 runs sampled)

**SqlString.format**
Before: 748,544 ops/sec ±5.95% (77 runs sampled)
After: 3,443,988 ops/sec ±5.53% (83 runs sampled)

I think that whole `SqlString` should be highly optimized. Functions are called hundreds to millions of times. It will make a big difference if you are working with a lot of data. (Many inserts etc...)