buffer: improve `btoa` performance
Improves the performance of the legacy btoa
function. It's not recommended to be used in production.
confidence improvement accuracy (*) (**) (***)
buffers/buffer-btoa.js n=1000000 size=1024 *** 1089.00 % ±15.27% ±20.57% ±27.29%
buffers/buffer-btoa.js n=1000000 size=128 *** 571.99 % ±6.85% ±9.22% ±12.22%
buffers/buffer-btoa.js n=1000000 size=16 *** 306.04 % ±4.24% ±5.70% ±7.53%
buffers/buffer-btoa.js n=1000000 size=256 *** 870.77 % ±13.85% ±18.67% ±24.78%
buffers/buffer-btoa.js n=1000000 size=32 *** 350.58 % ±4.61% ±6.18% ±8.15%
buffers/buffer-btoa.js n=1000000 size=64 *** 462.57 % ±5.60% ±7.51% ±9.91%
Disclaimer
"btoa" is a legacy functionality, and not recommended to be used in production applications.
Thanks Matthieu Riegler for the poster