Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
cpu cache test
(version: 1)
Comparing performance of:
i,j vs j,i vs i,j pre-optimized
Created:
one year ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const createSubArray = () => Array(100).fill(Math.random()); var src = Array(100).fill(createSubArray()) var dest = Array(100).fill(createSubArray())
Tests:
i,j
for(let i=0; i<100; i++){ for(let j=0; j<100; j++){ dest[i][j] = src[i][j]; } }
j,i
for(let i=0; i<100; i++){ for(let j=0; j<100; j++){ dest[j][i] = src[j][i]; // 添え字の順番が逆 } }
i,j pre-optimized
for(let i=0; i<100; i++){ const dest_i = dest[i] const src_i = src[i] for(let j=0; j<100; j++){ dest_i[j] = src_i[j]; } }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
i,j
j,i
i,j pre-optimized
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser/OS:
Chrome 134 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
i,j
10139.5 Ops/sec
j,i
11004.5 Ops/sec
i,j pre-optimized
63783.3 Ops/sec
Related benchmarks:
reduce vs loop
reduce vs loop
reduce vs loop
For loop initialization.
for uncached/cached vs. forEach
This site broken
forinfororfor*for
TestKey
index array vs cache indexed value
Comments
Confirm delete:
Do you really want to delete benchmark?