Comparison of using split('T') or slice(0, indexOf('T')) in parsing out a date from an ISO string.
Does not include any extra checking from the indexOf to ensure proper formatting of the string.
Does not include array size checking after the split.
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory
Test case name
Result
split
slice
Fastest:N/A
Slowest:N/A
Latest run results:
Run details: (Test run date:
2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36