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> |
||
|---|---|---|
| .. | ||
| buffer-base64-encode.js | ||
| buffer-bytelength.js | ||
| buffer-compare.js | ||
| buffer-creation.js | ||
| buffer-iterate.js | ||
| buffer-read.js | ||
| buffer-slice.js | ||
| buffer-write.js | ||
| dataview-set.js | ||