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 47852800A3 for ; Wed, 21 Dec 2016 17:31:35 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=info@gerd-stolpmann.de; spf=None smtp.mailfrom=info@gerd-stolpmann.de; spf=None smtp.helo=postmaster@mout.kundenserver.de Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.126.135; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.126.135; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.kundenserver.de) identity=helo; client-ip=212.227.126.135; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@mout.kundenserver.de"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AbkcL+BSYHbX+o9/NlO/8gtyXltpsv+yvbD5Q0YIu?= =?us-ascii?q?jvd0So/mwa6zZxSN2/xhgRfzUJnB7Loc0qyN4vumCTZLvsjJmUtBWaQEbwUCh8?= =?us-ascii?q?QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6?= =?us-ascii?q?OPn+FJLMgMSrzeCy/IDYbxlViDanb75/KBu7oR/Su8UIjodvKKc8wQbVr3VVfO?= =?us-ascii?q?hb2XlmLk+JkRbm4cew8p9j8yBOtP8k6sVNT6b0cbkmQLJBFDgpPHw768PttRnY?= =?us-ascii?q?UAuA/WAcXXkMkhpJGAfK8hf3VYrsvyTgt+p93C6aPdDqTb0xRD+v4btnRAPuhS?= =?us-ascii?q?waLDMy7n3ZhdJsg6JauBKhpgJww4jIYIGOKfFyerrRcc4GSWZdW8pcUTFKDIGh?= =?us-ascii?q?YIsVF+cPPvtWoYnjqVUArxS+CxWjCuTgxTJTiX/6wbc33v47HA3a2AEtGc8Fvn?= =?us-ascii?q?TOrNXyMacfSeG7w7fSzTrecvhYxCv96I/MchA5pPGDR7RwcczMwkQoFgPFiFuQ?= =?us-ascii?q?qYv+MjOayOsNqXWU4/N7VeKzjG4nrxlxoj21yccqjInFnJ8axU7d+Ch/3Y07K9?= =?us-ascii?q?q4SEthbt6lFptdry6aOJVsQsw/Wm1oozo6yroCuZ6jeSgF0pInxxjFZ/OabYeE?= =?us-ascii?q?+g7sW/yUITd8mH1lea6/hhao/Uin0O38Wc+520tJoCpditTAqG0B2wLJ5sSZVP?= =?us-ascii?q?dw/F2t1SuR2w3S8O1IPE45mKrDJ5MiwrM8jIcfvEfNEyPsmUj7iLWaelgl9+S1?= =?us-ascii?q?7ensf6/oqYWGN4BujwHzKqQuldK7AeQ/KgUOWm+b+fmg1LH5/k35XbNKgeAona?= =?us-ascii?q?nfq5DVO94bprCnDA9PyIos9giwAy+n0NQeg3YHMEpIdAyag4T3IV3CPu70APWl?= =?us-ascii?q?j1ixjjtmxurKMqDvD5jNNnTDla3ufbd5605S0gozytVf6opVCrEHLvLzXVT8tN?= =?us-ascii?q?PGAR8jLgO42v3nCMl61oMaQWKPB7WWMKXUsVOS++0gPfGAZJUJtzblN/gl+/nu?= =?us-ascii?q?gGclllAHeKmp2YIbaHS5HvR9P0WUemHsg9cEEWcSpAUyVu3qiFuYUT5SfXm+Ra?= =?us-ascii?q?w85itoQL6hWK7HT4GryJKb3TywHtUCb2RPC1bKH23pbI6Ec/MBeCOcI4lqlTlS?= =?us-ascii?q?EfCQTJMo0FmEvRX8zKsvevvT5iQdv5v50t9kz+LWnBA2szdzCpLO/XuKSjRbk3?= =?us-ascii?q?kEDwQq26RnpEV7zB/X0K52hNRXGMZfouhVVQMiMJfayap2BoahCUr6Yt6VRQP+?= =?us-ascii?q?EZ2dCjYrQ4d0modWbg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AZAABqrVpYhod+49RdGQEBAQEBAQEBA?= =?us-ascii?q?QEBBwEBAQEBFAEBAQEBAQEBAQEBBwEBAQEBgwoBAQEBAXmBB41QllOVE4IKJoV?= =?us-ascii?q?8AoFePxQBAQEBAQEBAQEBARIBAQEICwsJHTBCDIFlGgGCGwEFVRcNEAsYLlcGA?= =?us-ascii?q?RIJiGYBCapwiwcBAQEBAQEBAwEBAQEBAQEBEQ+FRYVKhDAcgkALgwoFiGWSEoF?= =?us-ascii?q?RApoDhjSOJIQPH4FhLoN2gWlxAYVGgxEBAQE?= X-IPAS-Result: =?us-ascii?q?A0AZAABqrVpYhod+49RdGQEBAQEBAQEBAQEBBwEBAQEBFAE?= =?us-ascii?q?BAQEBAQEBAQEBBwEBAQEBgwoBAQEBAXmBB41QllOVE4IKJoV8AoFePxQBAQEBA?= =?us-ascii?q?QEBAQEBARIBAQEICwsJHTBCDIFlGgGCGwEFVRcNEAsYLlcGARIJiGYBCapwiwc?= =?us-ascii?q?BAQEBAQEBAwEBAQEBAQEBEQ+FRYVKhDAcgkALgwoFiGWSEoFRApoDhjSOJIQPH?= =?us-ascii?q?4FhLoN2gWlxAYVGgxEBAQE?= X-IronPort-AV: E=Sophos;i="5.33,384,1477954800"; d="asc'?scan'208";a="205400837" Received: from mout.kundenserver.de ([212.227.126.135]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2016 17:31:34 +0100 Received: from office1.lan.sumadev.de ([85.183.69.161]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.167]) with ESMTPSA (Nemesis) id 0LvxEH-1ceoWU2T2T-017ogc; Wed, 21 Dec 2016 17:31:23 +0100 Received: from e130 (unknown [192.168.65.10]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 1592CDC05D; Wed, 21 Dec 2016 17:31:22 +0100 (CET) Message-ID: <1482337872.4629.108.camel@gerd-stolpmann.de> From: Gerd Stolpmann To: Alain Frisch , Yotam Barnoy Cc: =?ISO-8859-1?Q?Fr=E9d=E9ric?= Bour , "Soegtrop, Michael" , Christoph =?ISO-8859-1?Q?H=F6ger?= , "caml-list@inria.fr" Date: Wed, 21 Dec 2016 17:31:12 +0100 In-Reply-To: <45f9251b-c362-ac9f-fa71-07ab42087c90@lexifi.com> References: <7bc766a2-d460-524b-35ca-89609a34b719@tu-berlin.de> <1482148297.4629.19.camel@gerd-stolpmann.de> <0F7D3B1B3C4B894D824F5B822E3E5A172CFB9581@IRSMSX102.ger.corp.intel.com> <1482165686.4629.28.camel@gerd-stolpmann.de> <1506c421-618a-28d4-9a7b-7ba49baf47fa@lexifi.com> <45f9251b-c362-ac9f-fa71-07ab42087c90@lexifi.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-ZLAUoUud4kKy07stmKVj" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 X-Provags-ID: V03:K0:0XNvt7mUKdQUNUE+dOKNKa5lnbp0hpc8M4RYc2Fo83l/yVK7Gdj YoU13Iw0BpE89u3i9ZDI7Za7ziTF48AhcpAeqOj/NiuirVQGBUkOzfYCSrI1S4uccCB92Pq O3VfpX/n8ro31DGgFspbDqvz7psWWeHO6YzsleJrkhjuK2SFbzTdYa5e20DeYO1/ndpCzD+ 848DK+76v+vO7CjLtKebA== X-UI-Out-Filterresults: notjunk:1;V01:K0:zDXvDbO1AJE=:DP54sGCWr59AlFjBGGtYNK 2lGc9pYn/RiLOgBVkEVyZdLghSqrqv0hSOSe4fumDh/nB5w21T9XUfN4xMy2jMq1UR1/GjeiR nflNRYP56KqwoIUbxFcvavjrVhcZrGUD/C6Kao/2ktoHpIkmcKtHix2BFeRGH0grre0vTAocj lpxmt0Ow4RJh8+iOrvkXNE2TFYhMcxrAzOtWdvHhwrWNAdHPSv+Lhnob6e82f7OmMDo2c7e1B QbcC/ytbOQ781G+Bzm1lMb5uDu7wUKLYMYH8fRBl/wsZA0Lx9SQzk1oVs22co/pl+6OX2llea 6EXft7tNFV0HYyE9TJkfLAc0KmhJgkyLyuYpsJ72La7rhFxgc9AMIvECCLXuaeCDhcN6ORP4D +7c3Nc2sMUedUsDg2alwORdXg5pRTAts0/UksT4KCT3EUbjtrP9iszw39s7LcUnNdLvOM/eUy 7Sp5xaY4cs5HEkBw6TxdVwD9c5m5LrObczcGELz40o73eU4gXHkc/QQQiDmInWiUXRYVaDonN o/hSoDhsu4EvlBiV/T7LPPUTO28AhGef09SpXPe8OiEW469+Za+QuOTdG8+5TTVza86ixW04L c31DIdedka0eql/NhOgiF4vMxCWCcruZlF2GeY5KjWNsFP1Cb8UGOzRKJzwYjCSmn+9We4tE5 BfeWwoSwBDorYO7cvXjdBtHv1RWcSfw3FEFv0A0S6u9QvBYlUqNxiT4lIEeYD9uKTk4g= Subject: Re: [Caml-list] Closing the performance gap to C --=-ZLAUoUud4kKy07stmKVj Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Dumb question because you are effectively suggesting an alternate calling convention in addition to the existing one: wouldn't it make more sense to switch to a completely different convention? Like: we pass fp values always in fp registers so far available? Sure, there are cases leading to double allocations of the same value then. But getting this under control is some kind of CSE problem, and something that flambda can really deal with. I mean the current calling conventions only exist because of outdated CPU architectures (x87). Maybe it is time to rethink this. Gerd Am Mittwoch, den 21.12.2016, 17:06 +0100 schrieb Alain Frisch: > On 21/12/2016 15:45, Yotam Barnoy wrote: > >=20 > > I think it's not worth the effort. You need to examine all the code > > dealing with a parameter (ie. its flow) to see if any generic > > function > > is called on that parameter. > This would be treated a bit like the stubs for optional arguments > with a=A0 > default value.=A0=A0Any function taking float arguments or returning a > float=A0 > would be compiled to a specialized version with an unboxed calling=A0 > convention plus a stub which implements the generic calling > convention=A0 > and delegate the call to the specialized version (or copy its body if > it=A0 > is small enough).=A0=A0On call site, when the called function is known, > one=A0 > calls the specialized version instead.=A0=A0This is a systematic, local=A0 > compilation scheme, similar to other optimizations made in=A0 > closure/cmmgen; it does not require a more global analysis nor a=A0 > radically different representation of the code. >=20 > About the "it's not worth the effort": the effort has largely been > done,=A0 > since the ticket came with a working patch (some more effort would > be=A0 > needed to bring it up to date, though).=A0=A0In my opinion, this seems > like=A0 > a rather low-hanging fruit with very immediate and significant > gains.=A0 > I'd rather have this soon than wait for flambda to become stable and=A0 > usable on large projects. >=20 >=20 >=20 > -- Alain >=20 --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-ZLAUoUud4kKy07stmKVj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJYWq5QAAoJEAaM4b9ZLB5TmV4H/28tssLxlQGV/1IKFe00j4Ae 8sqhbYnCY5o88aHAIRq6fksnUgfic/oQAqS0tq9cy0pXqx0r5o3LtAApXSGk5Iec Kbt8kIQw+6bHwyrK7qQDq12MhNuCCuhiMCuyXzxG5JnTKb05+X+DybsDDtNxLwB5 tTfumb71Ts0Yi25nPn64TcHUXZjaQmjLxuaiDh+H80lcHgG7VEk1AJkc64VovcFa 2iXWBz2sjaoq7fAH6mx+ihDhwFsfjtl+SOXnemk+Chi9qIqIhcdbXb8+RSjl3wut RU9pOijkaekifTyzbdisu8urSsk4CTXJZJwoiiCDPqiJkA1hQ7nlbJiRpxtIfLQ= =I3b3 -----END PGP SIGNATURE----- --=-ZLAUoUud4kKy07stmKVj--