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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 2BAC37F257 for ; Wed, 7 Nov 2012 12:53:09 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of david.mentre@gmail.com) identity=pra; client-ip=209.85.223.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="david.mentre@gmail.com"; x-sender="david.mentre@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of david.mentre@gmail.com designates 209.85.223.182 as permitted sender) identity=mailfrom; client-ip=209.85.223.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="david.mentre@gmail.com"; x-sender="david.mentre@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f182.google.com) identity=helo; client-ip=209.85.223.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="david.mentre@gmail.com"; x-sender="postmaster@mail-ie0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvkBAIBKmlDRVd+2m2dsb2JhbABEw1cIIwEBAQEBCAkLCRQngh8BBQw0ATgBAwwBBQULOx8DEgEFARwGE4d4Aw8LnQqPJ4U3Jw2JTgEFDJI+A40xiEqBHI1HFimBWII6 X-IronPort-AV: E=Sophos;i="4.80,728,1344204000"; d="scan'208";a="161670426" Received: from mail-ie0-f182.google.com ([209.85.223.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 07 Nov 2012 12:53:08 +0100 Received: by mail-ie0-f182.google.com with SMTP id k10so3921894iea.27 for ; Wed, 07 Nov 2012 03:53:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=ZlAH9qYesr9z9hyyXmdYlKRHeTszYqaSZwjVwO3Umdk=; b=LIHLSv0YGvqnhxp36H8YVoEQTvP7PMj8tpJdpQ2J8IjnGAhM6n2a1Kn7Q+7N84pePL iNxXQva2mKYCtZn2m37TvccQOzHflETe6mn7XJjQ8ECBTbn8Wzo9pnJHwC2U9vpEPD/L mklNK5Uz9jny6CRAQg3ltfogW3Y2pnY32qN+zDX4kh4CJum4REcuRz4UuFvJL1Nvi2ur ZP3gjHWK2rCCjx4VSJtZBLmz+Y1zcD23BTMRxbMqgfrB1yt1ADI8OktKCem9AMrC9fE9 I9OBWK/ZHASUqEUmfaUBaVGLmQ3+xdy42R4T7905MfBoU5uwvXbVjGGUe0cBTyvxP7Xc YhbA== Received: by 10.50.156.232 with SMTP id wh8mr4279601igb.56.1352289187115; Wed, 07 Nov 2012 03:53:07 -0800 (PST) MIME-Version: 1.0 Sender: david.mentre@gmail.com Received: by 10.64.147.97 with HTTP; Wed, 7 Nov 2012 03:52:35 -0800 (PST) In-Reply-To: References: <5087C517.6000000@etorok.net> From: David MENTRE Date: Wed, 7 Nov 2012 12:52:35 +0100 X-Google-Sender-Auth: d5IboJyhPmnp1oJfJiKstCq7Rb0 Message-ID: To: =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= Cc: caml users Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] Behaviour of an OCaml program: any possible GC improvement? Hello, 2012/10/25 David MENTRE : > 2012/10/24 T=F6r=F6k Edwin : >> You can try tuning the Gc parameters: >> http://caml.inria.fr/pub/docs/old-311/libref/Gc.html >> >> Try increasing minor_heap_size, and major_heap_increment and see if ther= e is any improvement. >> Also look at Gc.stat() and see how many major collections and live words= you have. > > Olivier Andrieu made a similar suggestion and that helps! > > 2012/10/25 Olivier Andrieu: >> Try running your program with OCAMLRUNPARAM=3Ds=3D256k ! >> (A good value is about the size of the CPU L2 cache I'd say). > > Thanks Olivier, your suggestion brings significant improvements! > > On a particular example: > * default: 2m14.142s > * s=3D256k: 1m32.185s > * s=3D1024k: 0m45.420s For the record, it appears I was generating a Map of more than 100,000 entries (and using several variants of it). With some algorithm tweaking I improved drastically both the size of this map and the computation time of my program. Many thanks to those that have helped me on this issue! Best regards, david