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 DE96F801CD for ; Sun, 27 Aug 2017 10:33:59 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=dra-news@metastack.com; spf=Pass smtp.mailfrom=dra-news@metastack.com; spf=None smtp.helo=postmaster@outmail148093.authsmtp.net Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of dra-news@metastack.com) identity=pra; client-ip=62.13.148.93; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of dra-news@metastack.com designates 62.13.148.93 as permitted sender) identity=mailfrom; client-ip=62.13.148.93; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.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@outmail148093.authsmtp.net) identity=helo; client-ip=62.13.148.93; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="postmaster@outmail148093.authsmtp.net"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AMD1xOhALKA50OiN3YtEcUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSP38rsbcNUDSrc9gkEXOFd2Crakb26yL6+jJYi8p39WoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6i760TlHMxHyJQdk?= =?us-ascii?q?bsn6HZTVkYzj3uS/69vUZQFZwjaVbrZ7LRHwpgLU4Jo4m4xnf4o41BrF6lJMf/?= =?us-ascii?q?9R3XsgcV6JllP669ir1Jtu7y1Lp/sq9IhLVqCsLPdwdqBREDlzazN938bsrxSW?= =?us-ascii?q?FQY=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DLAADvgqJZh12UDT5dGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBFQEBAQECAQEBAQgBAQEBgmaBLYEVjhR0jyIuEQEBBk5YBBGWFYISKIU?= =?us-ascii?q?fAoNjPxgBAQEBAQEBAQEBARIBAQEKCwkIKC+CMyKCRAECAzo/EAIBCA4KHhAyJ?= =?us-ascii?q?QIEDoopDgMBtTyLVQEBAQEBAQQBAQEBAQEBAQEBAR2DKoICgQeCVYFLgTKIOII?= =?us-ascii?q?xBaBkh1aPAlqFDIpwlj0fgUUyISReEgGFBg8MgWd2iyABAQE?= X-IPAS-Result: =?us-ascii?q?A0DLAADvgqJZh12UDT5dGgEBAQECAQEBAQgBAQEBFQEBAQE?= =?us-ascii?q?CAQEBAQgBAQEBgmaBLYEVjhR0jyIuEQEBBk5YBBGWFYISKIUfAoNjPxgBAQEBA?= =?us-ascii?q?QEBAQEBARIBAQEKCwkIKC+CMyKCRAECAzo/EAIBCA4KHhAyJQIEDoopDgMBtTy?= =?us-ascii?q?LVQEBAQEBAQQBAQEBAQEBAQEBAR2DKoICgQeCVYFLgTKIOIIxBaBkh1aPAlqFD?= =?us-ascii?q?Ipwlj0fgUUyISReEgGFBg8MgWd2iyABAQE?= X-IronPort-AV: E=Sophos;i="5.41,434,1498514400"; d="scan'208";a="235431820" Received: from outmail148093.authsmtp.net ([62.13.148.93]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Aug 2017 10:33:58 +0200 Received: from mail-c245.authsmtp.com (mail-c245.authsmtp.com [62.13.128.245]) by punt20.authsmtp.com (8.14.2/8.14.2/) with ESMTP id v7R8XuIA012841; Sun, 27 Aug 2017 09:33:56 +0100 (BST) Received: from romulus.metastack.com (114.212-105-213.static.virginmediabusiness.co.uk [213.105.212.114]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id v7R8Xu1R068036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 Aug 2017 09:33:56 +0100 (BST) Received: from remus.metastack.local (remus.metastack.com [172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id v7R8XsbT002424; Sun, 27 Aug 2017 09:33:54 +0100 Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.03.0361.001; Sun, 27 Aug 2017 09:33:53 +0100 From: David Allsopp To: Alexey Egorov CC: caml users Thread-Topic: [Caml-list] flambda optimizations depends on unrelated things Thread-Index: AQHTHvS1D8eth5fJGEyONZm0jOhfnqKX4IN3 Date: Sun, 27 Aug 2017 08:33:52 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Server-Quench: 776fbd1d-8b02-11e7-801f-9cb654bb2504 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZZVg1f DC4bFwdFRBksPQFF ChxFJgxfNl8UURhQ KkJXbgASJgdDAnhE VHkJW1VTQF14U2B2 YQ9XIwdcYVRPXwB0 UklLXFNTEBpqBAMA SFgZMBEaMgQkeHh4 ZUVkEHRYWkI0ckF7 FBwAFDkbbTVgan0e URVfagtUcVVXd0wX bFV7BiEPZGUDKBg1 TUcAFDk0OXBbKT9J d0kDKVsXS0oCVjkk WxEHHCcmAUwCQT57 IxE+J1gQBw4WNA0v N0EsXVsEPhNaFg1f GU5WaAAA X-Authentic-SMTP: 61633634383431.1039:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 213.105.212.114/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Subject: Re: [Caml-list] flambda optimizations depends on unrelated things Alexey Egorov wrote: > Hello, >=20 > I'm trying hard to make efficient pure functional streams > implementation - and while playing with flambda, I'm discovered that > optimizations is VERY fragile and sometimes depends on completely > unrelated things. >=20 > Sometimes flambda goes mad if you change filename or just add some > empty lines to your source. >=20 > Here is example, where renaming source file increases code size by a > factor of 2 because of some unfortunate inliner decisions: >=20 > $ ls > fragile.ml > $ cp fragile.ml fragile2.ml > $ md5sum * > 6a13d560736c81b3e5b5dfe7f13c2f56 fragile2.ml > 6a13d560736c81b3e5b5dfe7f13c2f56 fragile.ml > $ ocamlopt -version > 4.05.0 > $ ocamlopt -O3 fragile.ml -dflambda 2>&1 | wc -l > 1774 > $ ocamlopt -O3 fragile2.ml -dflambda 2>&1 | wc -l > 3835 >=20 > Here is the code - https://pastebin.com/Y1DDidyN Please could you file a report on Mantis? https://caml.inria.fr/mantis David