Re: Upgrading our minimum required flex version for 8.5

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Upgrading our minimum required flex version for 8.5
Date: 2009-07-12 14:31:45
Message-ID: 4A59F3D1.9050900@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> As best I can tell after some casual testing on a couple of machines,
> the actual bottom line is that "raw_parser" (ie, the bison and flex
> processing) is going to be a couple of percent slower with a reentrant
> grammar and lexer, for typical queries involving a lot of short tokens.
> Now this disappears into the noise as soon as you include parse analysis
> (let alone planning and execution), but it is possible to measure the
> slowdown in a test harness that calls raw_parser only.
>
> A possible compromise that I think would avoid most or all of the
> slowdown is to make the lexer reentrant but not the grammar (so that
> yylval and yylloc remain as global variables instead of being parameters
> to yylex). I haven't actually benchmarked that, though. It strikes
> me as a fairly silly thing to do. If we're going to go for reentrancy
> I think we should fix both components.
>
> I'm willing to live with the small slowdown. Comments?
>
>
>

If we're going to have a reentrant lexer, I think we should go the whole
nine yards. I agree that a couple of percent slowdown on just the lexing
and parsing will be lost in the noise. So +1 from me.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-07-12 14:34:56 Re: Upgrading our minimum required flex version for 8.5
Previous Message Dean Rasheed 2009-07-12 13:14:49 Re: WIP: Deferrable unique constraints