From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA02139 for caml-red; Thu, 11 Jan 2001 18:32:26 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA19142 for ; Thu, 11 Jan 2001 11:46:18 +0100 (MET) Received: from dpt-info.u-strasbg.fr (dpt-info.u-strasbg.fr [130.79.6.1]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f0BAkIT02288 for ; Thu, 11 Jan 2001 11:46:18 +0100 (MET) Received: from lambda.u-strasbg.fr (lambda.u-strasbg.fr [130.79.90.63]) by dpt-info.u-strasbg.fr (8.9.3/8.9.3) with ESMTP id LAA08687; Thu, 11 Jan 2001 11:46:04 +0100 Received: from luther by lambda.u-strasbg.fr with local (Exim 3.20 #1 (Debian)) id 14GfDU-0001GN-00; Thu, 11 Jan 2001 11:44:24 +0100 Date: Thu, 11 Jan 2001 11:44:24 +0100 To: Alain Frisch Cc: Sven LUTHER , caml-list@inria.fr Subject: Re: Cost of polymorphic variants over normal ones. Message-ID: <20010111114424.A4852@lambda.u-strasbg.fr> References: <20010111101703.A3683@lambda.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.12i In-Reply-To: ; from frisch@clipper.ens.fr on Thu, Jan 11, 2001 at 11:40:05AM +0100 From: Sven LUTHER Sender: weis@pauillac.inria.fr 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 sure, Friendly, Sven Luther