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 0A2F17F615 for ; Mon, 19 Dec 2016 17:42:15 +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.131; 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.131; 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.131; 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=3AqcAy3h2p6VlgBJY4smDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?sesXK/zxwZ3uMQTl6Ol3ixeRBMOAuqkC1LWd4vmocFdDyK7JiGoFfp1IWk1Nou?= =?us-ascii?q?QttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZr?= =?us-ascii?q?KeTpAI7SiNm82/yv95HJbQhFgDSwbalwIRi0ogncstQaipZ+J6gszRfEv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=?us-ascii?q?I74zE2EIOmDYHNRoCqm7GB0zm0HodLaWxfEVCMDXDod4GcW/cJci2SJMlhniYZ?= =?us-ascii?q?Wre/U4Mhzw2htBfmy7p7KerZ4jEXuojm1Nhx/uHTkRAy9SdoD8mGyGGMT2R0nn?= =?us-ascii?q?sSSDMs3aB/p1Z9ylaZ3qRijfxYD48b2/QcGDw9OJHA1etiT5jXWwnBd9qNAh7y?= =?us-ascii?q?R9StATg8SpQqxNIBf1x6A/2jiAzO22yhBLpD0/SgBIY16b7bx3i5B1hyxmyOgK?= =?us-ascii?q?IhlVg9XsxXNSumgaNw+hL7G5OMmUiDk6esM6gRimqFvmyKyG7LuEBDTCZxV7/E?= =?us-ascii?q?VDYRfAGe+d/w40eHS761FZwmNBFAwIiMMP0ZRMfuiABpSe3vcO/CZGapnm62A1?= =?us-ascii?q?7cx7WCa6Lldn8RmT7BD0wclgkV+zCKOF5tVW+av2vCAWk2RhrUaET2/Lw78Svj?= =?us-ascii?q?Qw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AmAACBDVhYZ4N+49RdGwEBAQMBAQEJA?= =?us-ascii?q?QEBFwEBBAEBCgEBgwwBAQEBAR9agQaNT6tnggoqhXgCggI/FAEBAQEBAQEBAQE?= =?us-ascii?q?BEgsLCwcdMoIzGgGCGwQCSQw0C0ZJAQ0GARIJiGYBCaoFin4BAQEBAQUBAQEBA?= =?us-ascii?q?QETD4VFhEKBCIRMgkALgwoFiGKSDoFRAoR/gxKRaYY0jhmEDx+BXCuFV3EBhkw?= =?us-ascii?q?qghMBAQE?= X-IPAS-Result: =?us-ascii?q?A0AmAACBDVhYZ4N+49RdGwEBAQMBAQEJAQEBFwEBBAEBCgE?= =?us-ascii?q?BgwwBAQEBAR9agQaNT6tnggoqhXgCggI/FAEBAQEBAQEBAQEBEgsLCwcdMoIzG?= =?us-ascii?q?gGCGwQCSQw0C0ZJAQ0GARIJiGYBCaoFin4BAQEBAQUBAQEBAQETD4VFhEKBCIR?= =?us-ascii?q?MgkALgwoFiGKSDoFRAoR/gxKRaYY0jhmEDx+BXCuFV3EBhkwqghMBAQE?= X-IronPort-AV: E=Sophos;i="5.33,374,1477954800"; d="asc'?scan'208";a="205130331" Received: from mout.kundenserver.de ([212.227.126.131]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2016 17:41:48 +0100 Received: from office1.lan.sumadev.de ([85.183.69.161]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MXA60-1c722g0Urc-00W0xb; Mon, 19 Dec 2016 17:41:38 +0100 Received: from e130 (unknown [192.168.65.10]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id BFD85DC05D; Mon, 19 Dec 2016 17:41:36 +0100 (CET) Message-ID: <1482165686.4629.28.camel@gerd-stolpmann.de> From: Gerd Stolpmann To: "Soegtrop, Michael" , Christoph =?ISO-8859-1?Q?H=F6ger?= , "caml-list@inria.fr" Date: Mon, 19 Dec 2016 17:41:26 +0100 In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A172CFB9581@IRSMSX102.ger.corp.intel.com> References: <7bc766a2-d460-524b-35ca-89609a34b719@tu-berlin.de> <1482148297.4629.19.camel@gerd-stolpmann.de> <0F7D3B1B3C4B894D824F5B822E3E5A172CFB9581@IRSMSX102.ger.corp.intel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-pCODwhJ1hNFbIJblCa5k" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 X-Provags-ID: V03:K0:laQTBDqoaPNmNYcCWOTkPV5WIPMkGdDYg7SvXvjY6WP1tvx6dHZ lBZP6fjiJi2GipJOZeP1+VD/XqNKXE24m64m3goYDz8lzqlSivjVY4RZp/MB5OmIFzaprZ0 kCsRETYuvgYSnPhXIbChQx4rCSROtzeVcFBt94fx0pd+7spC/p0o6cxY+Rif1lzPxCb1sT0 NCEH2R5ZmOQqsqprRBYCg== X-UI-Out-Filterresults: notjunk:1;V01:K0:bSf1iL8pUKE=:QFbLc0c5rPRIOAgJT/1ot5 0d1O/nMLSwcZcJv0+UDoi1nV0OoYu5NgKy12JsiYr5FzGezr/TxVCXsQmZoD/t5HT2qMy2tNP JOu6y52CKHB/EFWMHoQa8u/JywaV8/kernBmKS69usURAim6zBW/EcMjMCzPGu6Su1ekbv2oR 04/ycCrEuyHgR8pZFROp/SptTS7Ip+c8TS0sUqr3wgMPGeV1dIpV4GgsqkTIxpF26I83ZsrWE Xc7ZmYsFR0rJTlbvRf/hrjHuStpHQs/4rrNrRmW88Ya0tesomjj3qvJToDXSotubEqc6pF4Ip GulWai+OJbToCmUppZq7HERz9VXthV7Wp2XueLhhJqEp3wV91rHVFP7lK7J7pBPXD2HlGWt7L JBQZwU/ll3fuOXW8Cm4LFiuJp8Ktg/LK6GMY26dVd8XMwkQnjLtORuiVjA4+hD+wMmFgY1bui NCfDUhHGaampoI7iksetoZpvk/Sbg8FKe6WcWPfT9aY+MbYtHtXkF5CChEUYs403KgMbMcDt6 j4FAxeangzu6zxivwCxwKmzeLIi+0zcMxhqdorq1InBQFLQU9Krk264p5ioEIkgQliXpCA5M7 bIpBUcGZ6xI0f9EJbgJVeQywr/FC68FhYIki46JToNi+mdhm9LZKfAUe2HR41GNGTvcjX+nrF 9L2FFHSE4Uyxj5PiI2uSMgej0alphlzY13O1AFS6DySkU8aSx1LazxnygF51WyT0kopM= Subject: Re: [Caml-list] Closing the performance gap to C --=-pCODwhJ1hNFbIJblCa5k Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Michael, look here, it's the "definitive source": https://github.com/ocaml/ocaml/blob/trunk/asmcomp/amd64/proc.ml Windows is in deed different. I don't have enough insight into the register spilling algorithm to say whether this has a significant effect, though. OCaml code never keeps registers alive, and thus I would bet the spilling algorithm is designed for that, and it is probably not tried to move values preferably to xmm6-15 in order to avoid spilling during C calls. But that's just a hypothesis... Does somebody know? Gerd Am Montag, den 19.12.2016, 14:52 +0000 schrieb Soegtrop, Michael: > Dear Gerd, >=20 > >=20 > > When you call a C function like cos it is likely that this > > happens because the C calling conventions do not preserve the FP > > registers > > (xmm*). This could be improved if the OCaml compiler tried > > alternate places for > > temporarily storing FP values: > For Windows this doesn't seem to be true. See e.g.: >=20 > https://msdn.microsoft.com/en-us/library/ms235286.aspx >=20 > which states that XMM0..XMM5 are volatile, while XMM6..XMM15 must be > preserved. >=20 > I think for Linix you are right. I couldn't find a better reference > than Wikipedia: >=20 > https://en.wikipedia.org/wiki/X86_calling_conventions >=20 > see "System V AMD64 ABI" there. > =A0 > This reference contains a good overview, which matches the above data > in table 4: >=20 > http://www.agner.org/optimize/calling_conventions.pdf >=20 > So on Windows, there is for sure no need to save XMM6..XMM15, while > on Linux this seems to be an issue. >=20 > Best regards, >=20 > Michael > Intel Deutschland GmbH > Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Christian Lamprechter > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928 >=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 ------------------------------------------------------------ --=-pCODwhJ1hNFbIJblCa5k 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 iQEcBAABCAAGBQJYWA23AAoJEAaM4b9ZLB5Tf0cH/jPCP1kBAMhohSbnY4PAMQkK VLNyOkVmWNVg8Ht5C4ai4zGQTsQcPelHHchw7hvkrQhcRqh1IgAKKG9HDhgNzIzA INxYelQ9R5okx/4zYaXUQ9N7VI6/mMimd7VrGjU67B9huazkET2i1PaIpL2rUoAz pKzRTDg1omVhkatVMElacLuY6pQ9+7VgIuUYeRs/XReGDSna7oDJkK7IPkzlgyEr ozzZm0KthDHYmKCZogfetOHqCmB5M3LzDWF9az3tpzuakH4q3ZQoODZdvO/G5yZ0 zXQozwSuhJw7I93gz7HQPToHLwF6qf/IBElpIudM501KO55Ryuqcy/304VQWbFA= =SIiY -----END PGP SIGNATURE----- --=-pCODwhJ1hNFbIJblCa5k--