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,DNS_FROM_RFC_ABUSE, 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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 97E27BB83 for ; Sat, 9 Sep 2006 17:47:53 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k89FlqNe027436 for ; Sat, 9 Sep 2006 17:47:53 +0200 Received: by ug-out-1314.google.com with SMTP id c2so1772358ugf for ; Sat, 09 Sep 2006 08:47:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=darwDwba1T+6YsJdxyJS5iZnBrpDC7EPIuaCE8HMCdaDRS/1N22NIAtiA1ZvzUTKHvuUAyOKHj4yFYtfcsw5FZbwNN9JTFG7GhW7gmVhH/z0mIlx/CfC0pbbh/mAbEELxycIEORM8riJ/OmEot5jMEeRG37gtSzwKVOsIacG/1U= Received: by 10.67.93.6 with SMTP id v6mr1706015ugl; Sat, 09 Sep 2006 08:47:51 -0700 (PDT) Received: by 10.66.221.7 with HTTP; Sat, 9 Sep 2006 08:47:51 -0700 (PDT) Message-ID: <2a1a1a0c0609090847j23b0b83fq1ba15e21e3faf383@mail.gmail.com> Date: Sat, 9 Sep 2006 11:47:51 -0400 From: "Mike Lin" Sender: nilekim@gmail.com To: "Erik de Castro Lopo" Subject: Re: [Caml-list] Memoization Cc: caml-list@inria.fr In-Reply-To: <20060909175652.93b8d71d.mle+ocaml@mega-nerd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060909103332.0397efea.mle+ocaml@mega-nerd.com> <45023723.2050708@andrej.com> <20060909175652.93b8d71d.mle+ocaml@mega-nerd.com> X-Google-Sender-Auth: 9da21ade200ca81e X-Miltered: at nez-perce with ID 4502E228.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; mikelin:01 memoization:01 memoize:01 integers:01 memoize:01 compiler:01 heap:01 -mike:01 arbitrary:01 caml-list:01 tuple:02 parameters:02 parameters:02 native:02 function:08 > The particular function I'm trying to memoize is a function of > two integers. I was hoping it might be possible to write a > memoize function that memoizes any function of a small arbitrary > number of parameters. Thinking about it some more I'm beginning > to this this is not possible. It is not very costly to give multiple parameters as a tuple. I think I remember reading that the native code compiler can do this without a heap allocation. -Mike