Commit 93739f48 authored by Tom Gallacher's avatar Tom Gallacher Committed by cjihrig
Browse files

buffer: default to UTF8 in byteLength()

If an undefined encoding is passed to byteLength(),
assume that it is UTF8 immediately. This yields a
small speedup, as it prevents string operations on
the encoding argument.

PR-URL: https://github.com/nodejs/node/pull/4010


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
parent a881b539
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