node/benchmark/tls
James M Snell 77331a7c01 tls: avoid calling Buffer.byteLength multiple times
There's no reason to be calling Buffer.byteLength() twice.
Small perf improvement

Run 1:
tls/convertprotocols.js n=1     v6.2.1 = 11852,  new = 12204 ......  -2.89%
tls/convertprotocols.js n=50000 v6.2.1 = 515660, new = 570610 .....  -9.63%

Run 2:
tls/convertprotocols.js n=1     v6.2.1 = 11729,  new = 12045 ......  -2.62%
tls/convertprotocols.js n=50000 v6.2.1 = 512080, new = 637730 ..... -19.70%

PR-URL: https://github.com/nodejs/node/pull/7236
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2016-07-05 22:11:40 +02:00
..
convertprotocols.js tls: avoid calling Buffer.byteLength multiple times 2016-07-05 22:11:40 +02:00
throughput.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
tls-connect.js tools,benchmark: increase lint compliance 2016-02-27 20:15:17 -08:00