[Haskell-cafe] Pure hashtable library

Bayley, Alistair Alistair.Bayley at invesco.com
Wed Aug 27 04:39:43 EDT 2008


> From: haskell-cafe-bounces at haskell.org 
> [mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Thomas Davie
> 
> 	>   Much better efficiency in what way?
> 
> 	instead of going through many levels of tree/trie, 
> lookup function will just select array element by hash value 
> and look through a few elements in assoc list:
> 
> 	data HT a b = HT (a->Int)               -- hash function
> 	                 (Array Int [(a,b)])
> 
> 	HT.lookup (HT hash arr) a   =   List.lookup (arr!hash a) a
> 
> Which makes two assumptions.  One is that your array is big 
> enough (believable), and the other, that your font is big enough.


> ... and the other, that your font is big enough.

Que? This is lost on me. Care to explain?

Alistair
*****************************************************************
Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.
*****************************************************************



More information about the Haskell-Cafe mailing list