joyent/node — pull request #4461 by bnoordhuis (2012-12-24 00:37:32+00:00)
Title: buffer: speed up base64 encoding by 20%

Remove a lot of branches from the inner loop. Speeds up buf.toString('base64')
by about 20%.

Before:

$ time out/Release/node benchmark/buffer-base64-encode.js
real 0m6.607s
user 0m5.508s
sys 0m1.088s

After:

$ time out/Release/node benchmark/buffer-base64-encode.js
real 0m5.520s
user 0m4.520s
sys 0m0.992s

Reviewers: @indutny @piscisaureus