You have it backwards; cache effects only start to matter once you have the other things right. For example, being able to transform boxed to unboxed arithmetic, or to optimize out function calls from tight loops, will, at least in most cases, give you a bigger performance boost than rearranging data for cache-friendliness will.