To use browser's atob() or btoa(), we need to convert between bytes and so-called "binary" string. This test convert bytes to "binary" string, for future calls of btoa(), i.e. encoding bytes (in the form of binary string) to base64.
Comparing performance of:Array.from + join + fromCodePoint vs Array.from + join + fromCharCode vs Array.reduce + fromCodePoint vs Array.reduce + fromCharCode vs String concatenation + fromCodePoint vs String concatenation + fromCharCode vs Function.apply + Array.reduce+ fromCodePoint (chunked) vs Function.apply + Array.reduce + fromCharCode (chunked) vs Function.apply + String concatenation + fromCodePoint (chunked) vs Function.apply + String concatenation + fromCharCode (chunked) vs Function.apply + Array.reduce+ fromCodePoint (small chunks) vs Function.apply + Array.reduce + fromCharCode (small chunks) vs Function.apply + String concatenation + fromCodePoint (small chunks) vs Function.apply + String concatenation + fromCharCode (small chunks) vs utf-16 TextDecoder