2 ms·
Not to counter the main argument but CPU loves it some predictable patterns as well. pattern like the one below will execute up to 10 times faster if array is
by FpUser 6y ago
Not to counter the main argument but CPU loves it some predictable patterns as well.
pattern like the one below will execute up to 10 times faster if array is sorted due to data locality and branch prediction
sum: float
a: float array[some_huge_number]
fill_array(a, random(1))
for f in a
if a[i]>0.5
sum=sum+f