[Numpy-discussion] libflatarray

Sturla Molden sturla.molden at gmail.com
Thu Feb 13 09:37:16 EST 2014

Neal Becker <ndbecker2 at gmail.com> wrote:
> I thought this was interesting:
> http://www.libgeodecomp.org/libflatarray.html

This is mostly flawed thinking. Nowadays, CPUs are much faster than memory
access, and the gap is just increasing. In addition, CPUs have hierarchical
memory (several layers of cache). Most algorithms therefore benefit from
doing as much computation on the data as possible, before reading more data
from RAM. That means that an interleaved memory layout is usually the more
effective.  This of course deepends on the algorithm, but an array of
structs is usually better than a struct of arrays.


More information about the NumPy-Discussion mailing list