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=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 14BCDBC6B for ; Sat, 15 Dec 2007 22:33:40 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAI7XY0fAbSoIh2dsb2JhbACQAQEBAQgKKZgQ X-IronPort-AV: E=Sophos;i="4.24,172,1196636400"; d="scan'208";a="6869212" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail3-smtp-sop.national.inria.fr with ESMTP; 15 Dec 2007 22:33:35 +0100 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from einhorn.in-berlin.de (localhost [127.0.0.1]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id lBFLXYlI030917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 15 Dec 2007 22:33:34 +0100 Received: (from www-data@localhost) by einhorn.in-berlin.de (8.13.6/8.13.6/Submit) id lBFLXY0d030915 for caml-list@yquem.inria.fr; Sat, 15 Dec 2007 22:33:34 +0100 X-Authentication-Warning: einhorn.in-berlin.de: www-data set sender to oliver@first.in-berlin.de using -f Received: from dslb-088-073-072-078.pools.arcor-ip.net (dslb-088-073-072-078.pools.arcor-ip.net [88.73.72.78]) by webmail.in-berlin.de (IMP) with HTTP for ; Sat, 15 Dec 2007 22:33:34 +0100 Message-ID: <1197754414.4764482e09e3f@webmail.in-berlin.de> Date: Sat, 15 Dec 2007 22:33:34 +0100 From: Oliver Bandel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ask for a more efficient way to deallocate memory (full version) References: <39980.81.57.198.61.1197236388.squirrel@webmail.lpn.cnrs.fr> <1197324811.475dba0b8c26d@webmail.in-berlin.de> <200712102259.30602.jon@ffconsultancy.com> In-Reply-To: <200712102259.30602.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Spam: no; 0.00; bandel:01 in-berlin:01 bandel:01 ocaml:01 ocaml:01 camlp:01 compiler:01 hand-written:01 compiler:01 camlp:01 top-down:01 recursive:01 bottom-up:01 lalr:01 wrote:01 Zitat von Jon Harrop : > On Monday 10 December 2007 22:13, Oliver Bandel wrote: > > Because I don't know how it's implemented, I don't know if this > adds a > > performance lack. But possibly it would make sense to look at it > closer > > to explore it's advantages and disadvantages... > > ...but I've no experience in OCaml extension, so I hope someone > here can > > say some wprds about it. > > OCaml has a great macro system called camlp4 that lets you add new > syntactic > constructs and rewrite OCaml code at will. Yes, so far I know it. > So Martin's code adds a > new > syntactic construct and automatically injects the code for the > compiler that > we must currently write by hand. Consequently, its performance will > be > superb: as good as hand-written OCaml code. So, is it just a kind of pre-compilation? The core-OCaml compiler will be the same? Is the TryFinally-code slight enough, so that it's behaving like handwritten OCaml? Did you look at the TryFinally in detail? > > However, using any camlp4 macros requires using the camlp4 > replacement for the > front-end of the compiler. I have not looked at the OCaml-compiler in detail, but from what you wrote I would assume, there are at least two parts. > That uses a different parsing technology > (top-down > recursive descent LL rather than bottom-up LALR) so the error > messages from > the compiler are completely different. Oh, well.... that's new to me. I had not needed camlp4 so far. And I don't know if it makes sense to look at it now, because there will be (or already is?) a replacement (from 3.10 on?). I hope the camlp4-tutorial will be updated to the camlp4-replacement. Possibly later I might use it. Then it would be good to have introductional material. Ciao, Oliver