Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
typed array copyWithin vs set
comparing speed of copyWithin vs set
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/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36
Browser:
Yandex Browser 24
Operating system:
Linux
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
set
93K/s
copyWithin
91K/s
View exact numbers
Test name
Executions per second
✓
set
92,621 Ops/sec
copyWithin
90,993 Ops/sec
Script Preparation code:
var array1_1e6 = Float32Array.from({length: 1e6}, Math.random); var target = 1e5; var start = 2e5; var end = 3e5; var array1_1e5 = Float32Array.from({length: 1e5}, Math.random); var array2_1e5 = Float32Array.from({length: 1e5}, Math.random);
Tests:
set
array1_1e5.set(array2_1e5);
copyWithin
array1_1e6.copyWithin(target, start, end);