Re: Bison state table - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Bison state table
Date
Msg-id 20190125235555.GI13803@momjian.us
Whole thread Raw
In response to Re: Bison state table  (David Fetter <david@fetter.org>)
Responses Re: Bison state table
List pgsql-hackers
On Sat, Jan 26, 2019 at 12:49:50AM +0100, David Fetter wrote:
> On Fri, Jan 25, 2019 at 05:38:59PM -0500, Bruce Momjian wrote:
> > With our scanner keywords list now more cache-aware, and with us
> > planning to use Bison for years to come, has anyone ever looked at
> > reordering the bison state machine array to be more cache aware, e.g.,
> > having common states next to each other rather than scattered around the
> > array?
> 
> Do we have a pretty good idea of what commonly grouped states are, or
> at least a way to get some not-awful estimates of what they are?

Uh, I am afraid we would need to profile the grammer with some sample
queries and then base the reordering on that, kind of how compilers use
sampling to do branch prediction.  Yeah, crazy idea, I know.  I figured
some smart person might have written a tool to do that.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Bison state table
Next
From: Bruce Momjian
Date:
Subject: Re: Strange wording in advanced tutorial