Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array from vs string split
(version: 0)
Comparing performance of:
Array.from vs string split
Created:
5 years ago
by:
Guest
Jump to the latest result
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('');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array.from
string split
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
10 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1.1 Safari/605.1.15
Browser/OS:
Safari 18 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Array.from
5433298.5 Ops/sec
string split
46994600.0 Ops/sec
Related benchmarks:
Array split vs string slice
Array from vs string split (with string transform)
Array split vs string substring ISO String
Array split vs string substring22
Comments
Confirm delete:
Do you really want to delete benchmark?