Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#17 indicator (set) hash-tables

open
Bruno Haible
None
5
2004-10-31
2004-10-31
Sam Steingold
No

sometimes a hash table is a just a set,
i.e., not a general map, but a {0,1}-valued one.
I suggest a new hash table category, created via,
e.g., :TYPE :SET argument to MAKE-HASH-TABLE,
where there is NO values vector and GETHASH returns
either T,T or NIL,NIL.
It should be printed as
#S(HASH-TABLE <TEST> list-or-values)
and :INITIAL-CONTENT argument to MAKE-HASH-TABLE
should be a LIST (not an Association List).

Discussion

  • Sam Steingold
    Sam Steingold
    2004-10-31

    Logged In: YES
    user_id=5735

    this HT will have no values vector which will save half the
    memory.
    also, access should be faster.