From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA02901; Wed, 10 Sep 2003 13:34:31 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA32381 for ; Wed, 10 Sep 2003 13:34:30 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h8ABYTf25230 for ; Wed, 10 Sep 2003 13:34:30 +0200 (MET DST) Received: from cedre.ens.fr (cedre.ens.fr [129.199.99.47]) by nef.ens.fr (8.12.9/1.01.28121999) with ESMTP id h8ABYQlL052441 for ; Wed, 10 Sep 2003 13:34:26 +0200 (CEST) Received: from (dejaeger@localhost) by cedre.ens.fr (8.11.2/jb-1.1) To: caml-list@inria.fr Subject: Re: [Caml-list] strange behaviour with variants and "cannot be g eneralized" References: <1063187322.2119.118.camel@localhost.localdomain> From: Frederic De Jaeger Date: 10 Sep 2003 13:34:25 +0200 In-Reply-To: <1063187322.2119.118.camel@localhost.localdomain> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 slower:01 variants:01 variants:01 behaviour:01 polymorphic:01 rewriting:02 typing:03 slightly:03 compiled:05 cheers:06 pattern:06 ens:06 type:07 parametric:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk skaller> They not only allow more accurate typing, skaller> they're also *faster*. For example, skaller> consider a restriction of a term type skaller> in which rewriting rules reduce some=20 skaller> sugars to lower level primitive skaller> (for example macro expansion). [example skipped] That's right, in this case they are faster. But the pattern matching against polymorphic variants is slightly slower than the non-polymorphic ones. The later can be compiled as a parametric jump.=20 Cheers, Fr=E9d=E9ric De Jaeger ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners