Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
string.split(" ") once / twice benchmark
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:126.0) Gecko/20100101 Firefox/126.0
Browser:
Firefox 126
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
string.split(" ")
150886.2 Ops/sec
string.split(" ") x2
127154.3 Ops/sec
Script Preparation code:
var string = 'I\'ve had to optimize a lot of string munging while working on MXHR and in my experience, plain String methods are significantly faster than RegExps in current browsers. Use RegExps on the shortest Strings possible and do everything you possibly can with String methods.'
Tests:
string.split(" ")
var a = string.split(" ") console.log(a) console.log(a)
string.split(" ") x2
console.log(string.split(" ")) console.log(string.split(" "))