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 99FD17F615 for ; Mon, 19 Dec 2016 15:52:31 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=michael.soegtrop@intel.com; spf=Pass smtp.mailfrom=michael.soegtrop@intel.com; spf=None smtp.helo=postmaster@mga11.intel.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of michael.soegtrop@intel.com) identity=pra; client-ip=192.55.52.93; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="michael.soegtrop@intel.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of michael.soegtrop@intel.com designates 192.55.52.93 as permitted sender) identity=mailfrom; client-ip=192.55.52.93; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="michael.soegtrop@intel.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mga11.intel.com) identity=helo; client-ip=192.55.52.93; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="postmaster@mga11.intel.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A/LOYoRVB+H9u618Tyi9EOaCoFqDV8LGtZVwlr6E/?= =?us-ascii?q?grcLSJyIuqrYZRSFvKdThVPEFb/W9+hDw7KP9fuxAipfvt3f4TgrS99lb1c9k8?= =?us-ascii?q?IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUhrwOhBo?= =?us-ascii?q?KevrB4Xck9q41/yo+53Ufg5EmCexbal8IRiyowjdrMsbjIltJqswzhbCv2dFdf?= =?us-ascii?q?lRyW50P1yYggzy5t23/J5t8iRQv+wu+stdWqjkfKo2UKJVAi0+P286+MPkux/D?= =?us-ascii?q?TRCS5nQHSWUZjgBIAwne4x7kWJr6rzb3ufB82CmeOs32UKw0VDG/5KplVBPklC?= =?us-ascii?q?EKPCM//WrKiMJ/kbhbrQqhqRJh3oDUfI+bOvlwfqzffNMVWWVOUMlKWixdG4Ox?= =?us-ascii?q?a5cDA/YdMepFqYT2ulsArQG5BQmpHO7jxCJGhnjo0q01z+QhCwbG3BQ4E9kTt3?= =?us-ascii?q?rUrcn6NKcIXu+ryKnEwyjIYvRT2Tf89IfIcgouru+IXb5qasrRzlcgFwzZjlWK?= =?us-ascii?q?rozlJyiY1uULs2iH8eVgUfijhHIgqwF0uzWiwNonhIfOhoIQ0F/E9CN5zZ47JN?= =?us-ascii?q?25S057YMakH4VNuCGbLYR6WMQiQ3tnuCoiy70Gv4K7czYOyJg92hHQdeSLc42J?= =?us-ascii?q?4h3/TuaRJix4hHVreLKjnRq97U+gyujkWsau31ZKqDRKksPWunAKzRzT5c6KQe?= =?us-ascii?q?Z+8Ee5wTuDygTe5v9eLU00lafXMZ4szqAqmpcXv0nPBjL6lUT4gaOMeEgp9PKk?= =?us-ascii?q?5/rpb7jivJOQKox5hh3mPqgzm8GyBf40PhYOUmWU4+iwyqfv8E/9TbhMk/Y4iL?= =?us-ascii?q?PWsIrAKsQevqO5AxFa0oIk6xunCjem384XkWQaIF5feRKHiZTpNE/KIPziEfi/?= =?us-ascii?q?hFGsnC9qx/DAILLhHo3AImXHnbv/Z7pw605RxBAzwNxB/Z5ZDr8MLOr2WkDrtd?= =?us-ascii?q?zYChE5Mxazw+biENh904IeVn6PAqCDLqzStUWE5vkoI+aSa48VpCz9K/895/P1?= =?us-ascii?q?jH85n0Mdcret3ZcNdH+4GfFmL12DYXXwmtcBDXsKvg0mQeP2klKCVDpTa2+2X6?= =?us-ascii?q?I9/TE7FJmrDZzDR4ComLyOxj23HpxQZmBcC1CDC23kd4ueW6REVCXHDcJ7nnQ/?= =?us-ascii?q?Sb+lU4oo0xfm4A78xb1PIefO9mgDqZXnzN184euVmRxksXRfD96cyH2KV2FDvv?= =?us-ascii?q?0HSiV+iKt/u01m1lCb0e54hPFXGMZ7++4MWAogMZ/aieB3XZS6EAnIe9PMTFe9?= =?us-ascii?q?Xv2nByswR5Q/2ZVGN010HtHnihHYwwKrBaUUnvqFHspn3Ljb2i27HMFwxGrc07?= =?us-ascii?q?Flx3wnSctGOGnszvp69gPTDoPN1V6emqm2b6ME9C/L6GqHi2GJuRcLA0ZLTazZ?= =?us-ascii?q?UCVHNQPtptPj6xaaQg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0A2AADC81dYh100N8BdHgYMGAYMgw0BA?= =?us-ascii?q?QEBAXmBBgcBpB+VDoIKKoV4AoIBPxQBAQEBAQEBAQEBARIBAQEIDQkJHTCCMxi?= =?us-ascii?q?CHQEBAQIBAUk1CwIBCA4UJDIXAQ0CBAEaAYhaBwEOqh2LDQEBAQEBBQEBAQEBA?= =?us-ascii?q?QEBAR+GN4NQgQiEQoMvgjAFjz+LKwYBhlGbL5IoH4IHg26BaHIBhh4qgQYBgQw?= =?us-ascii?q?BAQE?= X-IPAS-Result: =?us-ascii?q?A0A2AADC81dYh100N8BdHgYMGAYMgw0BAQEBAXmBBgcBpB+?= =?us-ascii?q?VDoIKKoV4AoIBPxQBAQEBAQEBAQEBARIBAQEIDQkJHTCCMxiCHQEBAQIBAUk1C?= =?us-ascii?q?wIBCA4UJDIXAQ0CBAEaAYhaBwEOqh2LDQEBAQEBBQEBAQEBAQEBAR+GN4NQgQi?= =?us-ascii?q?EQoMvgjAFjz+LKwYBhlGbL5IoH4IHg26BaHIBhh4qgQYBgQwBAQE?= X-IronPort-AV: E=Sophos;i="5.33,374,1477954800"; d="scan'208";a="205114690" Received: from mga11.intel.com ([192.55.52.93]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2016 15:52:29 +0100 Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP; 19 Dec 2016 06:52:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,374,1477983600"; d="scan'208";a="44516535" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga005.fm.intel.com with ESMTP; 19 Dec 2016 06:52:26 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.79]) by IRSMSX109.ger.corp.intel.com ([169.254.13.8]) with mapi id 14.03.0248.002; Mon, 19 Dec 2016 14:52:25 +0000 From: "Soegtrop, Michael" To: Gerd Stolpmann , =?iso-8859-1?Q?Christoph_H=F6ger?= , "caml-list@inria.fr" Thread-Topic: [Caml-list] Closing the performance gap to C Thread-Index: AQHSWGXLquGzyUj5dEa6DNFMr23iAqEMGvqAgAMQu4CAAC4scA== Date: Mon, 19 Dec 2016 14:52:25 +0000 Message-ID: <0F7D3B1B3C4B894D824F5B822E3E5A172CFB9581@IRSMSX102.ger.corp.intel.com> References: <7bc766a2-d460-524b-35ca-89609a34b719@tu-berlin.de> <1482148297.4629.19.camel@gerd-stolpmann.de> In-Reply-To: <1482148297.4629.19.camel@gerd-stolpmann.de> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] Closing the performance gap to C Dear Gerd, > 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 plac= es for > temporarily storing FP values: For Windows this doesn't seem to be true. See e.g.: https://msdn.microsoft.com/en-us/library/ms235286.aspx which states that XMM0..XMM5 are volatile, while XMM6..XMM15 must be preser= ved. I think for Linix you are right. I couldn't find a better reference than Wi= kipedia: https://en.wikipedia.org/wiki/X86_calling_conventions see "System V AMD64 ABI" there. =20 This reference contains a good overview, which matches the above data in ta= ble 4: http://www.agner.org/optimize/calling_conventions.pdf So on Windows, there is for sure no need to save XMM6..XMM15, while on Linu= x this seems to be an issue. Best regards, 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