
On Mon, 06 Mar 2006 11:25:49 -0600, Nigel Stewart wrote:
Caching is one of the fundamental ways to achieve improved performance. I'm a bit surprised it hasn't been more of a topic in Boost discussions, or in computer science in general.
Here is an application for a C++ LRU datastructure in computer graphics: http://aim.adc.rmit.edu.au/phd/sgreuter/papers/graphite2003.pdf
In a nutshell, the datastructure is a fairly generic arrangement of std::list and std::map, but the replacement policy is fairly application-oriented.
Related to this was some activity towards a boost circular buffer container... Which is something I intend to revisit, some shiny day...
Nigel
I developed a similar data structure for an LRU cache a while back. It is fairly basic - all you can do with it is check if a value exists, and add a value, but that was all that was required when I wrote it. The maximum size of the cache is determined at construction time. I did consider adding the ability to chain caches together, so you could have a small primary cache to test first, with a bigger secondary cache backing it up, but the amount of work involved compared to the prospective gain didn't seem worth it at the time. S> -- <<< Eagles may soar, but weasels don't get sucked into jet engines >>> 4:12pm up 82 days 23:54, 27 users, load average: 0.00, 0.00, 0.08 Registered Linux User #232457 | LFS ID 11703