String to char array (v3)

Revision 3 of this benchmark created on


Setup

const str = 's m l xl';
const loopLength = 2000;

Test runner

Ready to run.

Testing in
TestOps/sec
String.split(' ')
for(let i=0; i<loopLength; ++i){
	str.split(' ');
}
ready
String.split(/\s+/)
for(let i=0; i<loopLength; ++i){
	str.split(/\s+/);
}
ready
String.split(/\s/)
for(let i=0; i<loopLength; ++i){
	str.split(/\s/);
}
ready

Revisions

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