[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison glr feature request.
From: |
Paul Eggert |
Subject: |
Re: Bison glr feature request. |
Date: |
Sun, 11 Sep 2005 22:00:14 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
address@hidden writes:
> it is. did you notice the buffer is always
> just double sized which theoretically can
> lead to high memory use, even when not needed?
Yes, but it at most overallocates by a factor of 2.
The reason for doubling is to limit the total CPU cost
of allocating the resulting memory.
These days, any application likely to be running a GLR parser is far
more likely to be worried about CPU cost than about a mere
factor-of-two overallocatoin. Hence it's worth trading space for time
here.