Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
array copy set vs block vs per item
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
set
39651528.0 Ops/sec
block
25414050.0 Ops/sec
per item
94770600.0 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const arr1 = new Float64Array([1,2,3,4,5,6,7,8,9]); const arr2 = new Float64Array([1,2,3,4,5,6,7,8,9]);
Tests:
set
arr1.set(arr2)
block
[ arr1[0], arr1[1], arr1[2], arr1[3], arr1[4], arr1[5], arr1[6], arr1[7], arr1[8], ]=arr2
per item
arr1[0] = arr2[0]; arr1[1] = arr2[1]; arr1[2] = arr2[2]; arr1[3] = arr2[3]; arr1[4] = arr2[4]; arr1[5] = arr2[5]; arr1[6] = arr2[6]; arr1[7] = arr2[7]; arr1[8] = arr2[8];