From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 6CF52BC6B for ; Tue, 10 Jul 2007 16:16:22 +0200 (CEST) Received: from smtp.janestcapital.com (www.janestcapital.com [66.155.124.107]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l6AEGLSY028165 for ; Tue, 10 Jul 2007 16:16:21 +0200 Received: from [172.25.131.105] [38.96.172.125] by janestcapital.com with ESMTP (SMTPD-9.10) id A4C802FC; Tue, 10 Jul 2007 10:16:40 -0400 Message-ID: <469394B4.1060205@gnu.org> Date: Tue, 10 Jul 2007 10:16:20 -0400 From: Sam Steingold User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: Jacques Garrigue Cc: Caml List Subject: Re: large parametrized polymorphic variant type combinations take forever to compile References: <4666E11F.6000308@podval.org> <4692991E.8040205@gnu.org> <20070710.083733.116353766.garrigue@math.nagoya-u.ac.jp> In-Reply-To: <20070710.083733.116353766.garrigue@math.nagoya-u.ac.jp> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 469394B5.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; parametrized:01 hash:01 type-checked:01 polymorphic:01 wrote:01 compile:01 variant:02 garrigue:03 jacques:03 gnu:03 gnu:03 let:03 declarations:04 message-----:05 pgp:05 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jacques Garrigue wrote: > From: Sam Steingold >> === f.ml === >> type ('a,'b,'c) t3 = [ >> | ('a,'b) F1.t1 >> | ('a,'b,'c) F2.t2 >> ] >> >> let f ~fa ~fb ~fc = function >> | # F1.t1 as x -> F1.f ~fa ~fb x >> | # F2.t2 as x -> F2.f ~fa ~fb ~fc x >> === f.ml === > In particular, you may not be aware that #F1.t1 and #F2.t2 are > actually expanded internally into huge or-patterns, which have to be > type-checked. are there any type declarations that I could add to improve performance? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGk5S0Pp1Qsf2qnMcRApD3AJ0RJvmUcPxFZd7B6GJNb+rmSQi32QCfaCHZ l0ta9Bm7mv1gE8D1/yhSdwU= =jOxd -----END PGP SIGNATURE-----