|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Examples.Array.Loop
Computing the sum over all x[i]*x[j], i,j=0,...,N-1 in two different loops which do exactly the same operations just accessing the array elements in different order. Why are the relative speeds of the loops so dramatically dependent on N when N is so small the array fits in the L1 data cache???
Constructor Summary | |
Loop()
|
Method Summary | |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Loop()
Method Detail |
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |