
2010/1/11 Stefan Strasser <strasser@uni-bremen.de>
Am Thursday 07 January 2010 11:14:46 schrieb Peder Holt:
Is it feasible to implement support for setting the max_cache_size per type?
could you please explain your use case and why the "cache_factor" feature is not sufficient for it?
Hmm. Good question. It think it is an example of premature optimization on my side. My main concern is to reduce the memory consumption. My secondary concern is to do this without loosing too much performance. The reason for introducing a max_cache_size per type is that this was the way I originally thought to attack the problem, before reading about your library. My guess now is that a global max_cache_size would probably be sufficient, and until performance profiling on a real world problem has shown something else, you can ignore my request for a max_cache_size per type. Also, as you say, you already have a way of assigning a weight to each object, which I will try first if performance is suffering. Regards Peder
this intuitively seemed useful to me but now I can't think of reason why I'd want to limit the cache size per type, if I can already assign a "weight" to each object in the cache. on second thought it also isn't so feasible to implement. the objects in the cache are stored in no particular order, the sweep algorithm only groups them logarithmically by time of last access. so there is no easy way to remove an object of a particular type. seperate lists would have to be maintained.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost