enforce()?
bearophile
bearophileHUGS at lycos.com
Mon Jul 19 14:11:25 PDT 2010
Steven Schveighoffer:
> Isn't everyone always
> saying around here how cheap memory is these days? ;)
RAM is cheap, but the CPU doesn't used RAM, it mostly uses L1 cache (and a bit L2/L3 caches too), and they cost a lot :-) The more space your data structure uses, the less you can fit in the cache. Today cache effects are important for the code performance.
This is a nice example, shows how reducing the size of the data structure and changing its arrangement (the original was a normal tree, transversed for each pixel) can improve the code performance by something like one order of magnitude for ray-tracing:
http://www.cs.utah.edu/~bes/papers/fastRT/paper-node12.html
Bye,
bearophile
More information about the Digitalmars-d
mailing list