Re: Hashtable/Two keys

From: Chris Uppal (chris.uppal_at_metagnostic.REMOVE-THIS.org)
Date: 03/21/05


Date: Mon, 21 Mar 2005 10:15:04 -0000

Alexander Mueller wrote:

> Well, the solution with two identical entries will definitely also work
> - its rather a personal thing. One entry for one object (as the "ideal"
> solution would be) makes me feel more "comfortable" than two entries.

I understand your unease with having two hashtables -- duplication is nearly
always a sign of a (at best) risky program design. However, in this case, I
think your instincts are leading you astray.

I.e. I don't think there is any way that you'll find a solution that is /any/
of:

    - simpler
    - more matainable
    - faster
    - takes smaller space

than the solution using two lookup tables.

    -- chris