Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #1396
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!panix!not-for-mail |
|---|---|
| From | jgk@panix.com (Joe keane) |
| Newsgroups | comp.programming, comp.lang.c |
| Subject | double hashing |
| Date | Mon, 2 Apr 2012 19:49:06 +0000 (UTC) |
| Organization | Public Access Networks Corp. |
| Lines | 32 |
| Message-ID | <jlcvrh$2bh$1@reader1.panix.com> (permalink) |
| NNTP-Posting-Host | panix5.panix.com |
| X-Trace | reader1.panix.com 1333396146 2417 166.84.1.5 (2 Apr 2012 19:49:06 GMT) |
| X-Complaints-To | abuse@panix.com |
| NNTP-Posting-Date | Mon, 2 Apr 2012 19:49:06 +0000 (UTC) |
| X-Newsreader | trn 4.0-test76 (Apr 2, 2001) |
| Xref | csiph.com comp.programming:1396 comp.lang.c:19223 |
Cross-posted to 2 groups.
Show key headers only | View raw
question
We some have 'docs' that can be 'contracted' or 'expanded'.
They sometimes change from contracted to expanded and vice versa.
They each have a 'key' that's unique [and doesn't change when they
change state].
struct condocinfo { ... };
struct expdocinfo { ... };
The info for an expanded doc is a superset of the info for a contracted doc.
[e.g., pointers to more structures].
Lookup by key.
Scheme 1
We keep a hash table for all docs that contains the info for contracted
docs. We keep a hash table for only expanded docs that contains the
info for expanded docs that's not in the first one.
Scheme 2
We keep a hash table for only contracted docs that contains the info for
contracted docs. We keep a hash table for only expanded docs that
contains the info for expanded docs.
Time? Space?
[it's for an old project so it's academic]
Back to comp.programming | Previous | Next — Next in thread | Find similar
double hashing jgk@panix.com (Joe keane) - 2012-04-02 19:49 +0000 Re: double hashing Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-04-02 13:02 -0700 Re: double hashing Udit Gangwani <uditg22@gmail.com> - 2012-04-06 03:34 -0700
csiph-web