When lexing, use a perfect hash function to recognise lang

22 Jan
2002
22 Jan
'02
6:02 a.m.
malcolm: Tue Jan 22 12:02:50 CET 2002 Update of /usr/src/master/nhc/src/compiler98 In directory hinken:/tmp/cvs-serv25512 Modified Files: LexLow.hs Log Message: 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.
8519
Age (days ago)
8519
Last active (days ago)
0 comments
1 participants
participants (1)
-
malcolmīŧ sparud.net