Julian Taylor <jtaylor.deb...@googlemail.com> wrote:
> I was thinking of something much simpler, just a layer of pointer stacks
> for different allocations sizes, the larger the size the smaller the
> cache with pessimistic defaults.
> e.g. the largest default cache layer is 128MB and with one or two
> entries so we can cache temporal close operations like a + (c * b).
> Maybe an age counter can be included that clears the largest old entry
> if it hasn't been used for X allocations.

It would not be difficult if we e.g. used two heaps instead of one. One
would sort the cached blocks according to size (similar to malloc), the
other would be a priority queue for age. Every now and then the expired
entries would be cleared off the cache. 

Sturla

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to