Re: User-defined EQUALP

From: Adam Warner (usenet_at_consulting.net.nz)
Date: 10/14/04

  • Next message: Pascal Bourguignon: "Re: Sacla loop: a new loop implementation"
    Date: Thu, 14 Oct 2004 20:23:33 +1300
    
    

    Hi Ingvar,

    > I bashed together (what looks like) generic hash table code, with
    > user-supplied "equals" function and user-supplied "make a hash"
    > function, with a determinable initial hash size.

    ...

    > If enough people are interested, I could probably make the code
    > available somewhere.

    Please do. The standard provides no appropriate hash table predicate for
    case sensitive vectors of strings:

    (equal #("Adam" "Warner") #("Adam" "Warner")) => nil, assuming the literal
    vectors aren't coalesced by the compiler.

    While (equalp #("Adam" "Warner") #("Adam" "Warner")) is true, so is
    (equalp #("Adam" "Warner") #("AdAm" "WaRnEr")).

    For this data structure EQUAL doesn't work as a case sensitive version of
    EQUALP. It works with lists but breaks with vectors.

    Regards,
    Adam


  • Next message: Pascal Bourguignon: "Re: Sacla loop: a new loop implementation"

    Relevant Pages

    • Re: what happened to hash-tables
      ... >> You already need hashtables anyway internally for implementing Common ... Many of the people on the committee had much more experience ... The ANSI standard is about memorializing the "Common" practice ... Suppose that the winning extensible hash table protocol is based ...
      (comp.lang.lisp)
    • Re: CryptoAPI and private key /not public/ encryption with CryptEncrypt - can not use CryptHash* fun
      ... >> It is possible with CAPI, but not possible with any of standard Microsoft ... > Encrypting with the private key is equivalent to signing. ... > than the hash that's used in the signature process, ...
      (microsoft.public.platformsdk.security)
    • Re: Which hashing function to use?
      ... The C standard does not contain a hash function. ... computer scientist and need, hm, very practical advice. ... There are string searching algorithms faster than a hash table (See ...
      (comp.lang.c)
    • Re: PROJECT IDEAS
      ... Hash: SHA1 ... you know some standard ... Printing on GNU/Linux? ...
      (comp.unix.programmer)
    • Re: [OT] Seeking optimization advice
      ... Smart profiler. ... And here's your first chance at an optimization: ... It's not by chance that most compilers and interpreters use hash ... of the standard library doesn't include a hash_map (which is ...
      (comp.lang.cpp)