English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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