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.1 required=5.0 tests=AWL,HTML_MESSAGE,SPF_NEUTRAL 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 C5815BC6C for ; Mon, 7 May 2007 00:16:37 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l46MGbGV002834 for ; Mon, 7 May 2007 00:16:37 +0200 Received: by ug-out-1314.google.com with SMTP id k3so848891ugf for ; Sun, 06 May 2007 15:16:36 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=RX+J9aWHuy8jnKGRNccwsPxKdeq9IMJpl9CShLWBCpNjTOUPM4p1WvZMnqIuhfJP1YDcFjfzQ+cMgRtV4AE7iJtKmmqOmBRTQGNkCGqK6NyfV+hbn7onBogLWmGsHGpICqEKSM19jqArH96xisFm3anGgOYNLEZhYDTwGLJuiOA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=A7DvKduncD1okdo6/g3fCpt2YFEm/ZRa/wcC8aEiaEo5C1dqSF3+nIYKgtJKEb7tCoyQidfy7zMjaghTo+JVGg/xxka5pDC2dEk+qPZMsa7hpoqx4yBlahZ9a1z4LFBUlRe3VmL+CYu8fUMPoDLgyNI+1Okp1Knp/SLx9IlDagw= Received: by 10.82.173.19 with SMTP id v19mr10101515bue.1178489796090; Sun, 06 May 2007 15:16:36 -0700 (PDT) Received: by 10.82.157.14 with HTTP; Sun, 6 May 2007 15:16:36 -0700 (PDT) Message-ID: Date: Mon, 7 May 2007 00:16:36 +0200 From: Tom To: "Brian Hurt" Subject: Re: [Caml-list] 246 constructors? Cc: skaller , "caml-list@inria.fr" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_69633_15813361.1178489796047" References: <1178480953.4443.4.camel@rosella.wigram> X-j-chkmail-Score: MSGID : 463E53C5.005 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 463E53C5.005 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; constructors:01 constructors:01 camlp:01 transforming:01 annotation:01 camlp:01 transforming:01 annotation:01 wrote:01 wrote:01 caml-list:01 simplify:01 simplify:01 implemented:02 implemented:02 X-Attachments: cset="UTF-8" cset="UTF-8" ------=_Part_69633_15813361.1178489796047 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I think a better and simpler (and probably faster as well) solution would be to simply use an extra "tag word" for all constructors of the "large-tag type". It could even probably be implemented using camlp4 extenstion (turning all "large-tag types" into records with an implicit first word indicating the tag, and then transforming the pattern matching of these values to pattern matching of records. To simplify things, you could even use a special annotation for such blocks (for the camlp4 version only, of course). - Tom On 06/05/07, Brian Hurt wrote: > > > I think a better solution, although I have no idea how difficult it'd be > to implement, would be "large tag blocks". For blocks with large tag > values (say, >245), the tag value in the tag word would be the special > "large tag" tag (say, value 246), and the last word of the block would be > the "large" tag value. I say last, as this means you can still get the > nth word of a block without needing to special case large blocks. This > would allow a full word to be used for tag values (giving way more than > enough tag values), and wouldn't change either memory usage or code for > blocks with small tag values. > ------=_Part_69633_15813361.1178489796047 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline I think a better and simpler (and probably faster as well) solution would be to simply use an extra "tag word" for all constructors of the "large-tag type". It could even probably be implemented using camlp4 extenstion (turning all "large-tag types" into records with an implicit first word indicating the tag, and then transforming the pattern matching of these values to pattern matching of records. To simplify things, you could even use a special annotation for such blocks (for the camlp4 version only, of course).

- Tom

On 06/05/07, Brian Hurt <bhurt@spnz.org> wrote:

I think a better solution, although I have no idea how difficult it'd be
to implement, would be "large tag blocks".  For blocks with large tag
values (say, >245), the tag value in the tag word would be the special
"large tag" tag (say, value 246), and the last word of the block would be
the "large" tag value.  I say last, as this means you can still get the
nth word of a block without needing to special case large blocks.  This
would allow a full word to be used for tag values (giving way more than
enough tag values), and wouldn't change either memory usage or code for
blocks with small tag values.

------=_Part_69633_15813361.1178489796047--