Racket doesn't implement hash tables using a hash function. If I recall correctly, it uses b-trees as the representation for a hash table. The Racket reference states that "Immutable hash tables actually provide O(log N) access and update. Since N is limited by the address space so that log N is limited to less than 30 or 62 (depending on the platform), log N can be treated reasonably as a constant." See. https://docs.racket-lang.org/reference/hashtables.html
Justin On Fri, Aug 2, 2019 at 9:22 PM Jesse Wang <[email protected]> wrote: > > Racket allows different types of keys in a single hash, so there must be a > hash function that works for different types(different primitive types), I > wonder how Racket implements this under the hood. > Also, If I want to implement a hash table which allows different types of > keys, how can I implement such a hash function in Racket? > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/ad183814-d9f1-454b-b1a2-d1a9b394f49d%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CA%2B80D0W3sAX0h-QQvZ-6tiZZo6QFzNZNOGxxYhGHJ07LhtPVwQ%40mail.gmail.com.

