Bruno Haible <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: >> This sounds like an obvious win for linkedhash-list, in these days of >> inexpensive RAM and the 8GB hobby system. Back when I wrote hash.c, >> data structure size was the primary constraint in the computational >> geometry applications I cared about. > > Small data structure sizes are still important, because of memory caches: > There is usually a level-1 cache near the CPU, then a level-2 cache, and then > only comes the main memory measured in gigabytes. The level-1 cache is often
And then there's L3 cache, and maybe even flash-based cache before you get to "disk". No argument from me. > only a few kilobytes large. You can consider that a memory access to an > uncached memory location is about 6-8 times slower than a memory access to > cached memory. (*) > > So, the smaller the data structures, the faster your program will be. > Bit fields are *not* outdated! Of course not ;-) My point was that with our much larger RAM sizes today, the "right" balance for hash.c may now involve using more memory to save processing time. Of course, I don't really expect anyone to make changes to hash.c and to find time to perform all the profiling that'd be required for justification.
