Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
split vs slice
Javascript split vs slice performance
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Browser:
Chrome 127
Operating system:
Linux
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
split
4.5M/s
slice
2.4M/s
View exact numbers
Test name
Executions per second
✓
split
4,549,213 Ops/sec
slice
2,449,746 Ops/sec
Script Preparation code:
var rgb = "rgba(255,255,255,0.7)";
Tests:
slice
rgb.split("(")[1].slice(0, -1).split(",");
split
rgb.split("(")[1].split(")")[0].split(",")