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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser:
Chrome 134
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
UInt32Array Iteration copy
1992968.0 Ops/sec
UInt32Array copyWithin
29905994.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);