Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Replace text vs slice text
Replace text vs slice text
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/149.0.0.0 Safari/537.36
Browser:
Chrome 149
Operating system:
Linux
Device Platform:
Desktop
Date tested:
3 months ago
Benchmark engine:
Benchmark.js
Slice
271.6M/s
Replace
55.7M/s
View exact numbers
Test name
Executions per second
✓
Slice
271,612,128 Ops/sec
Replace
55,724,368 Ops/sec
Script Preparation code:
var textCid = 'Replace'; var text = 'Replace text vs slice text';
Tests:
Replace
text.replace(textCid, '');
Slice
text.slice(textCid.length);