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,SUBJECT_EXCESS_QP autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 101CABC6B for ; Tue, 11 Dec 2007 00:08:41 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CANpVXUfUnw7Vg2dsb2JhbACCOI0tAQEBCAQGIgc X-IronPort-AV: E=Sophos;i="4.24,148,1196636400"; d="scan'208";a="5497417" Received: from ptb-relay02.plus.net ([212.159.14.213]) by mail1-smtp-roc.national.inria.fr with ESMTP; 11 Dec 2007 00:08:40 +0100 Received: from [80.229.56.224] (helo=beast.local) by ptb-relay02.plus.net with esmtp (Exim) id 1J1rjs-0006yV-2f for caml-list@yquem.inria.fr; Mon, 10 Dec 2007 23:08:40 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ask for a more efficient way to =?iso-8859-1?q?deallocate=09memory=09?=(full version) Date: Mon, 10 Dec 2007 22:59:30 +0000 User-Agent: KMail/1.9.5 References: <39980.81.57.198.61.1197236388.squirrel@webmail.lpn.cnrs.fr> <1197324811.475dba0b8c26d@webmail.in-berlin.de> In-Reply-To: <1197324811.475dba0b8c26d@webmail.in-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712102259.30602.jon@ffconsultancy.com> X-Spam: no; 0.00; bandel:01 ocaml:01 ocaml:01 camlp:01 compiler:01 hand-written:01 camlp:01 compiler:01 top-down:01 recursive:01 bottom-up:01 lalr:01 frog:98 wrote:01 oliver:01 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. 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. However, using any camlp4 macros requires using the camlp4 replacement for the front-end of the compiler. 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. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e