|[4 earlier articles]|
|Re: 50 times longer to compile than copy firstname.lastname@example.org (David Chase) (2000-11-07)|
|Re: 50 times longer to compile than copy Sid-Ahmed-Ali.TOUATI@inria.fr (Sid Ahmed Ali TOUATI) (2000-11-07)|
|Re: 50 times longer to compile than copy ONeillCJ@logica.com (Conor O'Neill) (2000-11-09)|
|Re: 50 times longer to compile than copy email@example.com (Lex Spoon) (2000-11-09)|
|Re: 50 times longer to compile than copy firstname.lastname@example.org (2000-11-09)|
|Re: 50 times longer to compile than copy email@example.com (jacob navia) (2000-11-09)|
|Re: 50 times longer to compile than copy firstname.lastname@example.org (2000-11-11)|
|Date:||11 Nov 2000 10:11:01 -0500|
|Organization:||AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com|
|Keywords:||design, performance, comment|
|Posted-Date:||11 Nov 2000 10:11:01 EST|
Im Artikel 00-11-077, email@example.com (Timon
>There are given two
>alternatives, one is a series of if statements, the other involves
>building a hash table. Now is this really commonly done or is it often
>simply the if approach because it's simpler?
I never found hash tables in existing programs, but they may be a
solution under certain circumstances. Otherwise often jump tables are
used, when the range of the case values is dense enough.
Conditional jumps often are used in the good old Fortran style, with
jumps for less and greater, and continued execution if the value is
equal to the case value. Hereby a single comparison can be used to
afterwards select one of three conditions.
And sometimes both approaches are used together, with jump tables for
the dense case values, and conditional jumps for other values.
[I've seen plenty of compilers that hash large sparse case tables. -John]
Return to the
Search the comp.compilers archives again.