LRU cache for ~=
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Oct 19 15:58:40 PDT 2009
Sean Kelly wrote:
> Andrei Alexandrescu Wrote:
>>
>> What I'm saying is that with the cache in place we'll have slices
>> that are safe and efficient. Right now they are not safe and not
>> efficient. I can hardly find reasons to characterize the new state
>> of affairs as kludgey.
>
> I'm not sure I agree that they'd be safe. Given only a pointer to
> the head of a block there's no way to know whether it represents the
> array or a slice of the array from [0..n].
That's the beauty of the cache: with the cache in place, you may
actually know that the memory beyond the end of a cached slice is seen
by nobody else.
Andrei
More information about the Digitalmars-d
mailing list