[cvs-nhc98] patch applied (hat): When lexing, use a perfect hash function to recognise language

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:11:59 EDT 2006


Tue Jan 22 03:02:49 PST 2002  malcolm
  * When lexing, use a perfect hash function to recognise language
  keywords, rather than the previous chained conditionals.  This makes
  the compiler approx 2% faster when built with nhc98 - there is no
  discernible effect on performance when built with ghc.  Nevertheless
  I'm committing the change, because on a full build of nhc98 with itself
  the 2% speedup totals to about 10 minutes saving.

    M ./src/compiler98/LexLow.hs -73 +130


More information about the Cvs-nhc98 mailing list