[Gtk2hs-devel] A new lexer/parser for c2hs [was: [C2hs] Re: support for 6.4]

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Mon May 30 14:38:52 EDT 2005


On Mon, 2005-05-30 at 19:18 +0100, Duncan Coutts wrote:
> Sadly it seems to have got quite a bit slower for reasons I don't
> quite understand. In particular making it monadic (which we need to do
> because of) seems to make it rather slower. It is now taking 6 seconds
> rather than 2 and so is now only a little faster that the original
> lexer. Though on the positive side it means that if the lexer is
> taking 6 out of the 8 second total then the parser is only taking 2
> seconds which is quite good.

Oops, slightly wrong about that. I was timing the unoptimised (ie no -O)
version. The lexer actually takes 3 seconds on my old sparc (and 0.3 on
my nice new athlon). So that's not so much of an increase from the 2
seconds I had initially.

So that means the parser is taking 5 out of the 8 seconds total which
makes more sense.

On my fast athlon the parsing time is 1.7 seconds which is really pretty
quick! It might even be quick enough that we don't need the precomp
feature in future, but we'll see how long it takes when we add in the
name analysis too.

Duncan



More information about the C2hs mailing list