[m-dev.] For review: hash table implementation

Ralph Becket rbeck at microsoft.com
Fri Feb 2 21:07:30 AEDT 2001


>From Fergus Henderson on 02/02/2001 02:52:38
> On 01-Feb-2001, Ralph Becket <rbeck at microsoft.com> wrote:
> > what is lacking is something like
> > 
> > 	:- func generic_hash(T) = int.
> 
> That could be implemented using the RTTI support,
> e.g. std_util__deconstruct, of course.  But I don't happen
> to have an implementation of it lying around, I'm afraid ;-)

Okay, that's another one for my list...

> > Aside: is there any real point in providing float_hash_pred and
> > char_hash_pred?
> > The former sounds absurd and the latter is probably better served with a
> > list
> > or array based approach.
> 
> `char_hash_pred' exists, it is just spelt `char__to_int' ;-)

Perhaps I should rename xxx_hash_pred to xxx_double_hash?

I agree that tries are better for large structures; if I need them
I'll take a look at the runtime implementation and see how it might
be teased out into user space.

Cheers,

Ralph

--
Ralph Becket      |      MSR Cambridge      |      rbeck at microsoft.com 

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list