substr (with size) vs split

Benchmark created on


Setup

var string = 'Spring 33';

Test runner

Ready to run.

Testing in
TestOps/sec
substr
return string.substr(string.indexOf(' ') + 1, string.length)
ready
split
return string.split(' ')[1];
ready

Revisions

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