uint8array (v2)

Revision 2 of this benchmark created on


Setup

window.str = 'a'.repeat(9999999).split('')

Test runner

Ready to run.

Testing in
TestOps/sec
1
new Uint8Array(str.map(c => c.charCodeAt(0)))
ready
2
var buffer = new Uint8Array(str.length)
for(let i = 0; i <str.length; i++) {
	buffer[i] = str[i].charCodeAt(0)
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.