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.5 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 EC47BBBAF for ; Sat, 28 Feb 2009 02:07:10 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmMBAD8dqEnUnwdkjWdsb2JhbACCKJI6AQEBAQkJCgkPBsIohBQG X-IronPort-AV: E=Sophos;i="4.38,279,1233529200"; d="scan'208";a="24817996" Received: from relay.pcl-ipout02.plus.net ([212.159.7.100]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 28 Feb 2009 02:07:10 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAD8dqEnUnw4U/2dsb2JhbACCKNUghBQG Received: from pih-relay08.plus.net ([212.159.14.20]) by relay.pcl-ipout02.plus.net with ESMTP; 28 Feb 2009 01:07:10 +0000 Received: from [87.112.14.152] (helo=leper.local) by pih-relay08.plus.net with esmtp (Exim) id 1LdDfa-0003NL-0A for caml-list@yquem.inria.fr; Sat, 28 Feb 2009 01:07:10 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Odd performance result with HLVM Date: Sat, 28 Feb 2009 01:12:24 +0000 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902280112.24115.jon@ffconsultancy.com> X-Plusnet-Relay: 58d1baa93175d1691ac6f00dfd9151b8 X-Spam: no; 0.00; high-level:01 ocaml:01 compilation:01 ocaml-like:01 ocamlc:01 ocamlopt:01 ocamlopt:01 frog:98 functions:01 70%:98 compiling:02 slower:02 benchmark:04 generated:05 written:07 I am developing a high-level virtual machine built upon LLVM and written in OCaml that uses JIT compilation to execute OCaml-like code at break-neck speeds. I just stumbled upon a weird performance result: compiling my VM with ocamlc and ocamlopt produces very different benchmark results for the performance of the generated code (which should be identical). For example, my float-based Fibonacci function becomes 70% slower if I use ocamlopt and some other float-based functions also see big performance drops. What is ocamlopt doing that might explain this? I assume it is fiddling with the floating point state somehow... -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e