node-modules/byte — pull request #11 by dead-horse (2014-08-24 06:45:45+00:00)
Title: optimize put, putChar

Breaking Change:

- separated `putBuffer` from `put`
- `putChar` do not support put number (use `put`)

before:

```
node version: v0.11.13, date: Sun Aug 24 2014 14:35:16 GMT+0800 (CST)
Starting...
5 tests completed.

buf[0] = 97 x 78,689,607 ops/sec ±3.59% (86 runs sampled)
put(0, 97) x 44,101,414 ops/sec ±0.67% (98 runs sampled)
putChar("0, a") x 60,806,620 ops/sec ±1.75% (91 runs sampled)
copy[0] = 97 x 12,113,205 ops/sec ±0.83% (93 runs sampled)
put() x 10,279,731 ops/sec ±1.61% (94 runs sampled)

node version: v0.10.31, date: Sun Aug 24 2014 14:36:56 GMT+0800 (CST)
Starting...
5 tests completed.
buf[0] = 97 x 75,576,871 ops/sec ±1.45% (95 runs sampled)
put(0, 97) x 22,925,256 ops/sec ±0.67% (97 runs sampled)
putChar("0, a") x 46,893,524 ops/sec ±1.10% (93 runs sampled)
copy[0] = 97 x 8,049,185 ops/sec ±0.54% (100 runs sampled)
put() x 6,243,376 ops/sec ±1.03% (94 runs sampled)
```

after

```
node version: v0.11.13, date: Sun Aug 24 2014 14:42:17 GMT+0800 (CST)
Starting...
6 tests completed.

buf[0] = 97 x 72,940,651 ops/sec ±2.54% (87 runs sampled)
put(0, 97) x 78,271,369 ops/sec ±1.93% (89 runs sampled)
putChar("0, a") x 66,992,172 ops/sec ±1.66% (94 runs sampled)
copy[0] = 97 x 11,934,991 ops/sec ±1.17% (92 runs sampled)
putBuffer(0, ) x 11,122,220 ops/sec ±1.40% (91 runs sampled)
putBuffer() x 10,783,686 ops/sec ±2.39% (92 runs sampled)

node version: v0.10.31, date: Sun Aug 24 2014 14:41:29 GMT+0800 (CST)
Starting...
6 tests completed.

buf[0] = 97 x 81,778,302 ops/sec ±1.60% (89 runs sampled)
put(0, 97) x 52,143,438 ops/sec ±0.99% (93 runs sampled)
putChar("0, a") x 47,774,024 ops/sec ±1.18% (93 runs sampled)
copy[0] = 97 x 7,995,448 ops/sec ±0.83% (96 runs sampled)
putBuffer(0, ) x 6,491,320 ops/sec ±0.62% (97 runs sampled)
putBuffer() x 6,234,120 ops/sec ±0.99% (94 runs sampled)
```