Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array from vs string split vs spread
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/22A3354 Safari/604.1
Browser:
Mobile Safari 18
Operating system:
iOS 18.0
Device Platform:
Mobile
Date tested:
one year ago
string split
38.4M/s
spread operator
21.6M/s
Array.from
4.7M/s
View exact numbers
Test name
Executions per second
✓
string split
38,371,076 Ops/sec
spread operator
21,633,162 Ops/sec
Array.from
4,667,532 Ops/sec
Script Preparation code:
var s1 = "foo"; var s2 = "foo 12312";
Tests:
Array.from
let n1 = Array.from(s1); let n2 = Array.from(s2);
string split
let n1 = s1.split(''); let n2 = s2.split('');
spread operator
let n1 = [...s1]; let n2 = [...s2];