Related articles |
---|
[4 earlier articles] |
Re: symbol tables and search tries anton@mips.complang.tuwien.ac.at (2006-01-31) |
Re: symbol tables and search tries RLake@oxfam.org.uk (2006-01-31) |
Re: symbol tables and search tries vmakarov@redhat.com (Vladimir Makarov) (2006-01-31) |
Re: symbol tables and search tries clint@0lsen.net (Clint Olsen) (2006-01-31) |
Re: symbol tables and search tries haberg@math.su.se (2006-01-31) |
Re: symbol tables and search tries henry@spsystems.net (2006-01-31) |
Re: symbol tables and search tries find@my.address.elsewhere (Matthias Blume) (2006-01-31) |
Re: symbol tables and search tries danwang74@gmail.com (Daniel C. Wang) (2006-01-31) |
Re: symbol tables and search tries mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2006-01-31) |
Re: symbol tables and search tries DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-01-31) |
Re: symbol tables and search tries henry@spsystems.net (2006-01-31) |
Re: symbol tables and search tries blume@tti-c.org (Matthias Blume) (2006-01-31) |
Re: symbol tables and search tries mr.waverlye@verizon.net (Mr.E) (2006-01-31) |
[10 later articles] |
From: | Matthias Blume <find@my.address.elsewhere> |
Newsgroups: | comp.compilers |
Date: | 31 Jan 2006 00:38:33 -0500 |
Organization: | Compilers Central |
References: | 06-01-085 06-01-111 06-01-112 |
Keywords: | symbols |
Posted-Date: | 31 Jan 2006 00:38:33 EST |
glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
> (snip)
>> [I don't understand what you're proposing. Balanced trees are O(log N)
>> to search and require rebalancing whenever you insert something. Hash
>> tables of the sort we usually use for compiler symbol tables are O(1)
>> and balancing isn't an issue. -John]
>
> Hash tables are O(1) until you have to resize them.
The cost of an insertion or an access of a hash table element is O(1)
amortized, taking the occasional need for resizing into account.
(This assumes that the resizing policy is chosen appropriately.
Example: Double the size when the load factor exceeds some fixed
threshold.)
Return to the
comp.compilers page.
Search the
comp.compilers archives again.