Re: tsearch in core patch, for inclusion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: tsearch in core patch, for inclusion
Дата
Msg-id 13303.1172069653@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: tsearch in core patch, for inclusion  ("Florian G. Pflug" <fgp@phlo.org>)
Список pgsql-hackers
"Florian G. Pflug" <fgp@phlo.org> writes:
> Markus Schiltknecht wrote:
>> I didn't find hard facts about runtime complexity of LALR, 
>> though (pointers are very welcome).

> a) and b) should be O(1). Processing one token pushes at most one state
> onto the stack, so overall no more than N stats can be popped off again,
> making the whole algorithm O(N) with N being the number of tokens of the
> input stream.

Yeah.  I was concerned about the costs involved in trying to pack the
state tables, but it appears that that cost is all paid when the grammar
is compiled --- looking into gram.c, it appears the inner loop contains
just simple array lookups.  Still, bloating of the state tables is
something we ought to pay attention to, because there's a distributed
cost once they no longer fit in a processor's L1 cache.  On my machine
"size gram.o" is over 360K already ...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: --enable-xml instead of --with-libxml?
Следующее
От: Brian Hurt
Дата:
Сообщение: Re: tsearch in core patch, for inclusion