emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal: block-based vector allocator


From: Dmitry Antipov
Subject: Re: Proposal: block-based vector allocator
Date: Wed, 06 Jun 2012 11:02:23 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

On 06/01/2012 09:43 PM, Stefan Monnier wrote:

BTW, if we change the vector allocation so it only uses vector-blocks
for vectors smaller than "vector-block-size / 2", as I think we should,

Why? Whatever this limit's value, it's possible to construct an allocation
pattern which will be a worst-case for this allocator, and I don't see
why one specially designed worst-case is more probabilistic than another.

[... from another e-mail...]

> I'm not saying the code is wrong.  I'm saying that its correctness
> should be made more explicit by using a different MEM_TYPE for
> vector blocks.  This way the correctness argument is trivial rather than
> relying on some reasoning about which kind of vector allocation
> is used in which circumstance.

Yet another mem_type duplicates live_vector_p, so complicates stack
marking code and makes it slower; IMHO it's not worth trying to make the
code larger and slower just for making correctness obvious for the reader.

Dmitry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]