Join GitHub today
buffer: various performance improvements #12361
Various performance improvements for a few different
I've decided not to mark this as semver-major despite changes such as
As far as I know there shouldn't be any other semver-major-like changes.
Affected core subsystem(s)
Not sure if it's too late to do anything, but I think this should have technically been
> Buffer.from('foo','ajdkl') TypeError: "encoding" must be a valid string encoding ...
> Buffer.from('foo','ajdkl') TypeError: Unknown encoding: ajdkl ...
The code that produces the first error message above is preserved, but it is moved to a location where it will never execute.
Unfortunately, this wasn't caught by tests because the only test case we have for that error (in
assert.throws(() => Buffer.from('', 'buffer'), TypeError);