From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id D35C5BC75 for ; Wed, 16 Feb 2005 09:20:04 +0100 (CET) Received: from will.iki.fi (will.iki.fi [217.169.64.20]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j1G8K4en014614 for ; Wed, 16 Feb 2005 09:20:04 +0100 Received: from acerf.exomi.com (fa-3-0-0.fw.exomi.com [217.169.64.99]) by will.iki.fi (Postfix) with ESMTP id CFD611A; Wed, 16 Feb 2005 10:20:01 +0200 (EET) Subject: Re: [Caml-list] Memory allocation nano-benchmark. From: Ville-Pertti Keinonen To: Jon Harrop Cc: caml-list@yquem.inria.fr In-Reply-To: <200502152051.55292.jon@jdh30.plus.com> References: <420B7A7E.90504@or.uni-bonn.de> <1108169091.3474.16.camel@pelican.wigram> <000c01c51369$278441c0$0100a8c0@mshome.net> <200502152051.55292.jon@jdh30.plus.com> Content-Type: text/plain Date: Wed, 16 Feb 2005 10:19:58 +0200 Message-Id: <1108541998.669.22.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 42130234.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 -unsafe:01 ocaml:01 ocaml:01 repetitive:01 ocamlopt:01 inlining:01 asmcomp:01 eliminates:98 explicitly:01 unsafe:01 closure:02 bounds:02 bounds:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Tue, 2005-02-15 at 20:51 +0000, Jon Harrop wrote: > Indeed, I'm in the "remove -unsafe" camp. Even if OCaml only hoisted bounds > checks in the simplest of cases, I think there would be a strong case for > removing this option. As far as I can tell OCaml *never* eliminates or hoists bounds checks (or any other repetitive operation), even in the simplest of cases. It does explicitly use unsafe operations in the standard library, though. ocamlopt doesn't really perform a lot of optimizations. The most significant ones (inlining, constant folding/value propagation, direct calls) appear to be done in a single pass (asmcomp/closure.ml).