Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
questions about costs of nativeint vs int
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-01-11 (17:32)
From: Sven LUTHER <luther@d...>
Subject: Re: Cost of polymorphic variants over normal ones.
On Thu, Jan 11, 2001 at 11:40:05AM +0100, Alain Frisch wrote:
> On Thu, 11 Jan 2001, Sven LUTHER wrote:
> > A (somewhat) related question would be, what is the cost of polymorphic
> > variants compared to noarmal ones ?
> > 
> > The normal variants are coded as integers, and using them is fast, while
> > polymorphic variants use some kind of hash functionn, but very simple.
> AFAIK, the hashing is done only during the compilation (or explicitly
> by external C functions). For instance (output of ocaml -dinstr):

Thanks for this info, i almost guessed that such was the cas,e but was not


Sven Luther