Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
map vs slice
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:155.0) Gecko/20100101 Firefox/155.0
Browser:
Firefox 155
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
9 days ago
Benchmark engine:
Benchmark.js
slice
1.7M/s
map
1.5M/s
View exact numbers
Test name
Executions per second
✓
slice
1,708,835 Ops/sec
map
1,514,068 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
slice
const array = Array.from({length: 100}) const anotherArray = [...array.slice()]
map
const array = Array.from({length: 100}) const anotherArray = array.map((i)=>i)