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=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 45C51BBAF for ; Tue, 5 Aug 2008 19:28:18 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYCAH8qmEiK54gDiGdsb2JhbACKcoZFAQEBDyCWc4Vv X-IronPort-AV: E=Sophos;i="4.31,311,1215381600"; d="scan'208";a="13739750" Received: from rouge.crans.org ([138.231.136.3]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 05 Aug 2008 19:28:18 +0200 Received: from localhost (localhost.crans.org [127.0.0.1]) by rouge.crans.org (Postfix) with ESMTP id 82D0D837C; Tue, 5 Aug 2008 19:28:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at crans.org Received: from rouge.crans.org ([10.231.136.3]) by localhost (rouge.crans.org [10.231.136.3]) (amavisd-new, port 10024) with LMTP id pk6XdgJ1GV03; Tue, 5 Aug 2008 19:28:17 +0200 (CEST) Received: from [88.185.141.188] (korell.glondu.net [88.185.141.188]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rouge.crans.org (Postfix) with ESMTP id 0A5F182EC; Tue, 5 Aug 2008 19:28:16 +0200 (CEST) Message-ID: <48988DB0.1030104@glondu.net> Date: Tue, 05 Aug 2008 19:28:16 +0200 From: =?UTF-8?B?U3TDqXBoYW5lIEdsb25kdQ==?= User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509) MIME-Version: 1.0 To: Warren Harris Cc: caml-list caml-list Subject: Re: [Caml-list] parameter passing optimizations References: <9CA17B22-757C-4ED0-866C-4C44E73DB423@metaweb.com> In-Reply-To: <9CA17B22-757C-4ED0-866C-4C44E73DB423@metaweb.com> X-Enigmail-Version: 0.95.0 OpenPGP: id=FCE03DAA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; ocaml:01 compiler:01 allocating:01 ocamlc:01 ocamlopt:01 cheers:01 phane:98 steph:98 warren:98 phane:98 wrote:01 stack:01 caml-list:01 tuples:01 data:02 Warren Harris wrote: > I've been wondering whether the ocaml compiler does any sort of > parameter passing optimizations for data structures, e.g. stack > allocating, or destructuring them when it can determine their scope doe= s > not escape the call. My first conclusion is that it does for tuples > only, but I wanted to see what others might know. Maybe you can check it out yourself with the -dinstr option of ocamlc, or the -S option of ocamlopt. Cheers, --=20 St=C3=A9phane