From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id D2C297F30D for ; Wed, 13 Mar 2013 20:44:10 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jon@ffconsultancy.com) identity=pra; client-ip=84.93.230.250; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="jon@ffconsultancy.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jon@ffconsultancy.com) identity=mailfrom; client-ip=84.93.230.250; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="jon@ffconsultancy.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@avasout05.plus.net) identity=helo; client-ip=84.93.230.250; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="postmaster@avasout05.plus.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEADPVQFFUXeb6gWdsb2JhbABDs0mRCwQBgVkWDgEBFiYogioBAQUIAjA/DQMCCRguGSMbAgQeBYgIwzCOBoEHB4NAA44lnDE X-IPAS-Result: AqIEADPVQFFUXeb6gWdsb2JhbABDs0mRCwQBgVkWDgEBFiYogioBAQUIAjA/DQMCCRguGSMbAgQeBYgIwzCOBoEHB4NAA44lnDE X-IronPort-AV: E=Sophos;i="4.84,838,1355094000"; d="scan'208";a="6001185" Received: from avasout05.plus.net ([84.93.230.250]) by mail3-smtp-sop.national.inria.fr with ESMTP; 13 Mar 2013 20:44:09 +0100 Received: from XPS ([87.115.188.46]) by avasout05 with smtp id B7k71l00410W6AX017k8o0; Wed, 13 Mar 2013 19:44:08 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.0 cv=dpoF/Sc4 c=1 sm=1 a=pYon0QjUe1aYl5m7EDk53g==:17 a=9NSLKdjcVD4A:10 a=Xub9RBUEA-sA:10 a=Kvk-SOs2Z7YA:10 a=kj9zAlcOel0A:10 a=r2vSxAw-AAAA:8 a=cdQsuJNHsHMA:10 a=DjtYSZY6EyqpAy1b6YsA:9 a=CjuIK1q_8ugA:10 a=pYon0QjUe1aYl5m7EDk53g==:117 X-AUTH: jdh302:2500 Reply-To: From: "Jon Harrop" To: "'Alain Frisch'" Cc: References: <00ba01ce200c$d23f1910$76bd4b30$@ffconsultancy.com> <5140BD88.7090905@frisch.fr> In-Reply-To: <5140BD88.7090905@frisch.fr> Date: Wed, 13 Mar 2013 19:44:08 -0000 Organization: Flying Frog Consultancy Ltd. Message-ID: <010f01ce2023$217baaa0$6472ffe0$@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGTusbNW31EwOb0tRgwTltM6UzJNgGyNcpwmQs4K6A= Content-Language: en-gb Subject: RE: [Caml-list] Case study in optimization: porting a compiler from OCaml to F# Alain Frisch wrote: > Too bad, because the really interesting part would to know (i) what kind of > optimizations you had to do on the F# version (and in particular whether > they make us of parallelism), * Replaced the use of exceptions for control flow with variant types. * Replaced use of fprintf with lower-level .NET functions. * Parallelized some of the symbolic code. * Algorithmic optimization to a search function. > (ii) whether (some of) those optimizations could be applicable to the OCaml > version as well, and * No need to replace exceptions in OCaml. * No need to replace printf and friends in OCaml. * Could try to parallelize the OCaml but it would be hard to do efficiently. * Algorithmic optimization could also be done to the OCaml (IIRC, this was a fairly minor speedup). > (iii) how much effort you initially put into optimizing the OCaml version (just > tweaking the GC parameters can easily give very substantial speedups for > symbolic processing). None. I didn't change the OCaml code at all and didn't try different GC parameters. However, it had already been quite heavily optimized. Cheers, Jon.