Commit cd42f561 authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

buffer: optimize Buffer.prototype.write(s, 'hex')

Move the implementation to C++ land. This is similar to commit 3f65916f
but this time for the write() function and the Buffer(s, 'hex')
constructor.

Speeds up the benchmark below about 24x (2.6s vs 1:02m).

  var s = 'f';
  for (var i = 0; i < 26; ++i) s += s;  // 64 MB
  Buffer(s, 'hex');
parent 916aebab
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment