News for hackers. Stuff that matters.
Re:JDK 7 Features by points on Monday September 20, 2010 @09:43AM (#1708744)
It's hardly a 'work around' :/

  int[][]
or

  reals int[]
  imaginaries int[]
Re:JDK 7 Features by wtallis on Monday September 20, 2010 @12:57PM (#1709513)
Java's multidimensional arrays aren't stored contiguously in memory because rows can be different lengths. If you have an int[][] a, then a[1] is simply a pointer to an int[]. You can't escape the excess of pointers.

If you try something like having an array for each component as a substitute for an array of structs, then that places fairly strict upper bounds on the length of the arrays before which you are guaranteed to have killed cache locality.