Version française
Home     About     Download     Resources     Contact us    
Browse thread
Converting variants with only constant constructors to integers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dario Teixeira <darioteixeira@y...>
Subject: RE: [Caml-list] Converting variants with only constant constructors to integers
Hi,

> > The compiler does not convert the above code to 'hashtable lookup'.
> 
> Is there a point where the compiler does do a table lookup
> for matches rather than jumps or have I clearly just dreamt that? :o)

I think Luc's objection was to the use of the word "hash" in "hashtable".
Using the word "hashtable" for an indexed lookup table is technically
correct if you consider the trivial hash function (the identity function);
this may be what David meant.  Nevertheless, in most people's minds an
hashtable conjures images of a non-trivial mapping, which I'm quite sure
is not what the compiler generates...

Cheers,
Dario Teixeira