Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
copyWithin: is it fast in Uint32Array
Comparing the performance between iteration and copyWithin in Uint32Array
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Browser:
Firefox 133
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
UInt32Array Iteration copy
7130177.0 Ops/sec
UInt32Array copyWithin
29312508.0 Ops/sec
Script Preparation code:
var buffer = new Uint32Array(1024*1024); for(var i=0; i< buffer.length; i++) { buffer[i] = Math.round(Math.random() * 256); }
Tests:
UInt32Array Iteration copy
var start = 100; var length = 200; var copyToPos = 1000; for(var i=0; i< length; i++) { buffer[copyToPos++] = buffer[start + i] }
UInt32Array copyWithin
var start = 100; var length = 200; var copyToPos = 1000; buffer.copyWithin(copyToPos, start, start + length);