0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/benchmark/buffers
Brendan Ashworth 9da168b71f buffer: optimize Buffer.byteLength
Buffer.byteLength is important for speed because it is called whenever a
new Buffer is created from a string.

This commit optimizes Buffer.byteLength execution by:
- moving base64 length calculation into JS-land, which is now much
  faster
- remove redundant code and streamline the UTF8 length calculation

It also adds a benchmark and better tests.

PR-URL: https://github.com/nodejs/io.js/pull/1713
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-22 15:31:03 -07:00
..
buffer-base64-encode.js Remove excessive copyright/license boilerplate 2015-01-12 15:30:28 -08:00
buffer-bytelength.js buffer: optimize Buffer.byteLength 2015-05-22 15:31:03 -07:00
buffer-compare.js Remove excessive copyright/license boilerplate 2015-01-12 15:30:28 -08:00
buffer-creation.js
buffer-iterate.js buffer: implement iterable interface 2015-01-28 16:40:15 +03:00
buffer-read.js buffer: improve {read,write}{U}Int* methods 2014-04-01 17:31:28 -07:00
buffer-slice.js benchmark: Add a test to measure Buffer.slice perf 2014-05-28 11:57:05 -07:00
buffer-write.js buffer: improve {read,write}{U}Int* methods 2014-04-01 17:31:28 -07:00
dataview-set.js