Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Init array of strings
(version: 0)
Strings.split vs array init
Comparing performance of:
Strings.split vs Array init
Created:
one year ago
by:
Registered User
Jump to the latest result
Tests:
Strings.split
let a = 'a b c d e f g h i j k l m'.split(' ')
Array init
let a = ['a','b','c','d','e','f','g','h','i','j','k','l','m']
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Strings.split
Array init
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0
Browser/OS:
Firefox 126 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Strings.split
5401947.0 Ops/sec
Array init
250117392.0 Ops/sec
Related benchmarks:
Array from vs string split
Array from vs string split (with string transform)
empty array diff
Array from vs string split (modified with long strings)
Array from vs string split vs spread
Array.from vs string split vs spread unicode
Array.fom(String) Vs. String.split('')
Comments
Confirm delete:
Do you really want to delete benchmark?