uint8array (v7)

Revision 7 of this benchmark created on


Setup

window.str = 'a'.repeat(99999)

Test runner

Ready to run.

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

Revisions

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