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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id CD4567FFB4 for ; Fri, 11 Mar 2016 15:48:24 +0100 (CET) IronPort-PHdr: 9a23:7995zxaq7SzMi81uD6LA7IH/LSx+4OfEezUN459isYplN5qZpMy7bnLW6fgltlLVR4KTs6sC0LqJ9fCxEjJfqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7/0q8yYPVoArQH+SI0xBS3+lR/WuMgSjNkqAYcK4TyNnEF1ff9Lz3hjP1OZkkW0zM6x+Jl+73YY4Kp5pIZoGJ/3dKUgTLFeEC9ucyVsvJWq5i/4UBCX63AAfmITmxtOS0iZvVCpFqv25w7zrOk14ymbO9L7SbR8DTG576ZtVxLsjA8FPjg0633Nh8FsyqlcpUTyiQZ4xtvlZ52cMbJUd7nbesJSEXtGQs9UXSVbBIStR4QKBusFe+1fqt+u9BM1sRKiCFz0V6vUwThSiyqzgPQ3 Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=yotambarnoy@gmail.com; spf=Pass smtp.mailfrom=yotambarnoy@gmail.com; spf=None smtp.helo=postmaster@mail-yw0-f172.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of yotambarnoy@gmail.com) identity=pra; client-ip=209.85.161.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of yotambarnoy@gmail.com designates 209.85.161.172 as permitted sender) identity=mailfrom; client-ip=209.85.161.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-yw0-f172.google.com) identity=helo; client-ip=209.85.161.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="postmaster@mail-yw0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BfAADo2eJWk6yhVdFehBBtBqlrhVSIVoIPAQ2BbSGFbAKBKAc4FAEBAQEBAQEBEAEBAQEHDQkJIS+CLYIUAQEBAwESER0BGxILAQMBCwYFCwMKDR0CAiIBEQEFAQoSBhMSEIdsAQMKCA6fdIExPjGLNoFqgleFSwoZJwMKUYNuAQEBAQEBAQMBAQEBAQEBARIBBQoFhgmEQoRnglOBOgWGIAyHfokZhW2ID4IvjFONMxEegQ8PDwEBgjgegW4eLopRAQEB X-IPAS-Result: A0BfAADo2eJWk6yhVdFehBBtBqlrhVSIVoIPAQ2BbSGFbAKBKAc4FAEBAQEBAQEBEAEBAQEHDQkJIS+CLYIUAQEBAwESER0BGxILAQMBCwYFCwMKDR0CAiIBEQEFAQoSBhMSEIdsAQMKCA6fdIExPjGLNoFqgleFSwoZJwMKUYNuAQEBAQEBAQMBAQEBAQEBARIBBQoFhgmEQoRnglOBOgWGIAyHfokZhW2ID4IvjFONMxEegQ8PDwEBgjgegW4eLopRAQEB X-IronPort-AV: E=Sophos;i="5.24,320,1454972400"; d="scan'208,217";a="207245373" Received: from mail-yw0-f172.google.com ([209.85.161.172]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 11 Mar 2016 15:48:23 +0100 Received: by mail-yw0-f172.google.com with SMTP id h129so95518729ywb.1 for ; Fri, 11 Mar 2016 06:48:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=sfdKsTq0CqRtWpoXxNvCV62zVgY1Mxn5LG/Ri6JqIi8=; b=qEW/bERFYceZYvwqDjlRBYEn+JXOBbGVy4bD2oN/1S8j53xdSUOJ2JeV73XoZr/BtK JFSSs0u4/n4fLgMZ2ChoAhPrv3xGVoNxf1kYRPMWdL5b7tQPMPpMMEx+cuZ0Xvyq1BWh xdYvJcp4k8rPkBcCpNQ9BEa2LmlIQaFFRNN9GY2yciaX9l2MGqotdGgYGsT9hARBW2TQ XhT4kpyblowFC5eg+k4CfgLeNGhWiy4SAb7Ueh7JNYkfGtSauKiaZxNmLK4mgo3r1sTh mNZwu01erFE/ZtY7hV5EW59AvEr1CpW5RPHO3tOClmtklm5BAuHNU3jnghzGiilNtiwf V2pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=sfdKsTq0CqRtWpoXxNvCV62zVgY1Mxn5LG/Ri6JqIi8=; b=Rh0MO6oxewloZWz5lgG1KX1bzhF+TPqCkI7/YDI7ZpUkvQvfeCHq4TArLeHLagitjE DeCGRxylD3LjJpwKa6yFSKynRC/7N6SaGl+MJGM70+MrN5JqHgNuP3DKk1ASbOyF42D/ kue1UVZwp4bhOCBiTtaZo7t2EJG8qdnvatynhLDfv5F5yAqmG91zUzUUN0WVFfXno4zO iMd8eF39EPRZPsqpIZb1hsdCls+fAdEXePJk7ynpAgjG20N5wru+tFTXCnAJE4vynd7W wS0mTJ+renEmAHyItkpcUH+UwWYhZFVLUzzLVwbOFTAJ3i4j1b1d5LTLk2FgiHD35x9Y JzMw== X-Gm-Message-State: AD7BkJKoUQQtSbVoBU0CLwyi/Oeyw7+CLM/Xy9hHgVKEZN2bDl09sYIBZBDHeli8UDc2KRDCeQHH1aD9B6PLLw== X-Received: by 10.129.86.131 with SMTP id k125mr5087308ywb.158.1457707702152; Fri, 11 Mar 2016 06:48:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.13.3 with HTTP; Fri, 11 Mar 2016 06:48:02 -0800 (PST) In-Reply-To: References: <56DF57FA.9070309@lexifi.com> <56E1D523.7000701@laposte.net> <1457650315.13223.42.camel@e130.lan.sumadev.de> <56E28B5F.2030002@lexifi.com> From: Yotam Barnoy Date: Fri, 11 Mar 2016 09:48:02 -0500 Message-ID: To: Mark Shinwell Cc: Alain Frisch , Gerd Stolpmann , Pierre Chambart , Markus Mottl , OCaml List Content-Type: multipart/alternative; boundary=001a1143312cc5f878052dc70598 Subject: Re: [Caml-list] Re: Status of Flambda in OCaml 4.03 --001a1143312cc5f878052dc70598 Content-Type: text/plain; charset=UTF-8 Another question: how will 4.03 be handled with regard to OPAM? The way I see it, the majority of users will want Flambda activated by default. Companies or individuals that depend on OCaml for their business will probably want to start off with Flambda turned off, and turn it on as needed. Additionally, to get Flambda tested by as many people as possible, I believe we want people to use it by default. -Yotam On Fri, Mar 11, 2016 at 4:26 AM, Mark Shinwell wrote: > Not at present. Although the technique of using stubs is heavily used > in Flambda for other optimisations (for example where the argument > list of a function is going to be modified). > > Mark > > On 11 March 2016 at 09:09, Alain Frisch wrote: > > On 11/03/2016 09:59, Mark Shinwell wrote: > >> > >> Also, for a function like the one you gave containing: > >> > >> if then else > >> > >> one of the reasons this should be kept in the .cmx files is because, > >> when the compiler comes to examine whether to inline it, it may be > >> able to fully evaluate . In particular when it's true then the > >> large expression can be eliminated completely (so long as is > >> not side-effecting). Another example is functions containing a large > >> match, where we may end up knowing which case is to be taken. > > > > > > For such cases, it is interesting to compile the function as a small stub > > that checks the condition or the match and jumps (tail call) into the > proper > > sub-body. Only the stub (and potentially small enough sub-bodies) would > be > > inlined, and the cmx would not need to store the large sub-bodies. Such > > approach was already taken for optional arguments, and I think that > flambda > > already generalizes it. Would the case above be treated like that? > > > > > > Alain > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --001a1143312cc5f878052dc70598 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Another question: how will 4.03 be handled with regard to = OPAM? The way I see it, the majority of users will want Flambda activated b= y default. Companies or individuals that depend on OCaml for their business= will probably want to start off with Flambda turned off, and turn it on as= needed. Additionally, to get Flambda tested by as many people as possible,= I believe we want people to use it by default.

-Yotam

On Fri,= Mar 11, 2016 at 4:26 AM, Mark Shinwell <mshinwell@janestreet.com> wrote:
Not at present.=C2= =A0 Although the technique of using stubs is heavily used
in Flambda for other optimisations (for example where the argument
list of a function is going to be modified).

Mark

On 11 March 2016 at 09:09, Alain Frisch <
alain.frisch@lexifi.com> wrote:
> On 11/03/2016 09:59, Mark Shinwell wrote:
>>
>> Also, for a function like the one you gave containing:
>>
>>=C2=A0 =C2=A0 if <cond> then <small expr> else <big = expr>
>>
>> one of the reasons this should be kept in the .cmx files is becaus= e,
>> when the compiler comes to examine whether to inline it, it may be=
>> able to fully evaluate <cond>.=C2=A0 In particular when it&#= 39;s true then the
>> large expression can be eliminated completely (so long as <cond= > is
>> not side-effecting).=C2=A0 Another example is functions containing= a large
>> match, where we may end up knowing which case is to be taken.
>
>
> For such cases, it is interesting to compile the function as a small s= tub
> that checks the condition or the match and jumps (tail call) into the = proper
> sub-body.=C2=A0 Only the stub (and potentially small enough sub-bodies= ) would be
> inlined, and the cmx would not need to store the large sub-bodies.=C2= =A0 Such
> approach was already taken for optional arguments, and I think that fl= ambda
> already generalizes it.=C2=A0 Would the case above be treated like tha= t?
>
>
> Alain

--
Caml-list mailing list.=C2=A0 Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocam= l_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--001a1143312cc5f878052dc70598--