Re: perfect hashing

Tim Josling <>
13 Aug 2000 19:06:13 -0400

          From comp.compilers

Related articles
[5 earlier articles]
Re: perfect hashing (2000-08-10)
Re: perfect hashing (2000-08-10)
Re: perfect hashing (Parzival) (2000-08-10)
Re: perfect hashing (2000-08-13)
Re: perfect hashing (Lars Duening) (2000-08-13)
Re: perfect hashing (2000-08-13)
Re: perfect hashing (Tim Josling) (2000-08-13)
Re: perfect hashing (2000-08-13)
Re: perfect hashing intmktg@Gloria.CAM.ORG (Marc Tardif) (2000-08-13)
| List of all articles for this month |

From: Tim Josling <>
Newsgroups: comp.compilers
Date: 13 Aug 2000 19:06:13 -0400
Organization: Melbourne PC User Group
References: 00-07-064 00-08-022 00-08-026 00-08-031 00-08-059
Keywords: symbols

One factor to keep in mind is that most compilers have to support
multiple dialects,and the keyword set changes from one dialect to
another. In that case you really need to have a dynamic keyword
list based on the compiler options, unless you want to
discutribute multiple executables.

The symbol lookup time does not register on the profiles I have
done on my compiler. Is this actually a real issue?

Tim Josling

> Another approach for detecting keywords which can be even more
> efficient is to just write a big multi-level switch statement
> where you test one character at a time. For example, if you have
> three keywords "the", "this", and "foo", you can use the following
> code:

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.