This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [boehms-gc] support for cache hash tables (gt_ggc_cache_rtab)


>>>>> "Laurynas" == Laurynas Biveinis <laurynas.biveinis@gmail.com> writes:

Laurynas> If the objects pointed to by them are collected, they are
Laurynas> automatically set to NULL by the collector, which looks like
Laurynas> HTAB_EMPTY_ENTRY to others. By comparison, current
Laurynas> collectors set them to HTAB_DELETED_ENTRY, is this
Laurynas> difference important, or just for statistics?


The general idea is that you don't want to re-hash all the entries in
a hash table when one entry is deleted.  But, if you mark a deleted
entry as "empty", then future searches may stop there instead of
proceeding on to find the real entry.

So, it matters quite a bit.

I only skimmed hashtab.c.  But, this is a pretty ordinary way to
implement hash tables, and by my reading hashtab.c does it this way as
well.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]