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 3AE4B7F30A for ; Mon, 25 Feb 2013 17:25:37 +0100 (CET) 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.186; 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.186; 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: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@moutng.kundenserver.de designates 212.227.126.186 as permitted sender) identity=helo; client-ip=212.227.126.186; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@moutng.kundenserver.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhYCAPmPK1HU4366Zmdsb2JhbABFFoMigxe7BoEFFg4LCxMBFAMkgh8BAQQBI1YFCwsYAgImAgJXBhMJC4d5CgitTJFPgSOHZ4VeJgeCLYETA418hQCEXoRYjXg X-IPAS-Result: AhYCAPmPK1HU4366Zmdsb2JhbABFFoMigxe7BoEFFg4LCxMBFAMkgh8BAQQBI1YFCwsYAgImAgJXBhMJC4d5CgitTJFPgSOHZ4VeJgeCLYETA418hQCEXoRYjXg X-IronPort-AV: E=Sophos;i="4.84,735,1355094000"; d="scan'208";a="3400248" Received: from moutng.kundenserver.de ([212.227.126.186]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 25 Feb 2013 17:25:36 +0100 Received: from office1.lan.sumadev.de (dslb-094-219-210-035.pools.arcor-ip.net [94.219.210.35]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0Lv6gg-1UrQbf1SZ0-00zgQA; Mon, 25 Feb 2013 17:25:33 +0100 Received: from [192.168.5.106] (dslb-094-219-210-035.pools.arcor-ip.net [94.219.210.35]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 04390C00CF; Mon, 25 Feb 2013 17:25:33 +0100 (CET) From: Gerd Stolpmann To: Alain Frisch Cc: Francois Berenger , caml-list@inria.fr In-Reply-To: <512B872B.60809@lexifi.com> References: <1361799073.2723.5@samsung> <512B872B.60809@lexifi.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 25 Feb 2013 17:26:08 +0100 Message-ID: <1361809568.3218.19.camel@thinkpad> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:kV93Xw8MbBQJaRGSDyXDOOZNsha2K4WooenZ7ZcoV6M g/7iwxJdusqImaZ0U2CQv5c3ld0KGjYHu52oCZLKCUZTdvRio1 voasJ9OBPCUjvd5I4fAvljV1uLPGJsCBL1dGsqndNi86vkfwXP b/SjMlGEkkWhLN6yGBSMhdg4u3R2TSl5mznuh2uEyY4HuIA+x9 v8t09WX22IQWd4AK9SEsMz9wKENb6E1T1PHKEwT+/OjFEvaIi5 Dgd/S2CUchsTqnb+ikHQHjNs0ADBIoEGx/Lmfuvq8oJ89bMQPu xbjKg+x74yanAtGa9q66J1RlvUQS+n5LBAcclj3/6G8kJGiSER 2bXJX1iIGr1kU3cA9qBqhmNmLWK8qH6Cv7O9XzibV Subject: Re: AW: [Caml-list] What is triggering a lot of GC work? Am Montag, den 25.02.2013, 16:45 +0100 schrieb Alain Frisch: > On 02/25/2013 02:31 PM, Gerd Stolpmann wrote: > > This can have counter-intuitive consequences. Yesterday I sped an > > imperative program up by adding allocations! > > This is really an interesting scenario, thanks for sharing! > > Two other approaches to addressing the same performance issue could have > been: > > 1. increase the size of the minor heap so that your array stays in it > long enough; > > 2. try to reduce the number of other allocations. > > Did you try one of these approaches as well? (1 in particular is > particularly easy to test.) No, there was no chance of keeping this array in the minor heap otherwise, the program was running for too long. > Gabriel Scherer recently called the community to share representative > "benchmarks", in order to help core developers target optimization > efforts to where they are useful: > > http://gallium.inria.fr/~scherer/gagallium/we-need-a-representative-benchmark-suite/ > > Gabriel: except from LexiFi's contribution, did you get any code? Gerd: > it would be great if you could share the code you mention above; is it > an option? Unfortunately not - it's an interpreter I developed for my customer. I can try to create a synthetic demo case just to show the effect. (The array is in this program actually a kind of stack frame, and it is interpreting some data manipulation code. When executing a statement, the current data item is put into the first cell of the frame, so we have really a lot of assignments here. The data items are strings, and every data manipulation creates new strings, and this results in some allocation speed (but not really high, as e.g. in a term rewriter).) Gerd > There are a number of optimizations which have been proposed > (related to boxing of floats, compilation strategy for let-binding on > tuples, etc), which could reduce significantly the allocation rate of > some programs. In my experience, this reduction can be observed on > real-sized programs, but it does not translate to noticeable speedups. > It might be the case that your program would benefit from such > optimizations. Having access to the code would be very useful! > > > Alain > -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de Creator of GODI and camlcity.org. Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de *** Searching for new projects! Need consulting for system *** programming in Ocaml? Gerd Stolpmann can help you. ------------------------------------------------------------