caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David MENTRE <dmentre@linux-france.org>
To: "Török Edwin" <edwin+ml-ocaml@etorok.net>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Behaviour of an OCaml program: any possible GC improvement?
Date: Wed, 7 Nov 2012 12:52:35 +0100	[thread overview]
Message-ID: <CAC3Lx=YBCVs=D3MKUGM=GPRNLQHXpdpcHTg528NE96DEGWV+jA@mail.gmail.com> (raw)
In-Reply-To: <CAC3Lx=aqo-RNC+1wLRQdaYPUR+0s7vCAifxE_UdcBt48d39FwQ@mail.gmail.com>

Hello,

2012/10/25 David MENTRE <dmentre@linux-france.org>:
> 2012/10/24 Török Edwin <edwin+ml-ocaml@etorok.net>:
>> 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 there 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=s=256k !
>> (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=256k: 1m32.185s
>   * s=1024k: 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

      parent reply	other threads:[~2012-11-07 11:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 10:08 David MENTRE
2012-10-24 10:33 ` John Whitington
2012-10-24 12:30   ` David MENTRE
2012-10-24 12:39     ` John Whitington
2012-10-24 12:45       ` Edgar Friendly
2012-10-24 12:53         ` John Whitington
2012-10-24 13:19       ` David MENTRE
2012-10-24 13:27         ` John Whitington
2012-10-24 13:38         ` Oliver Bandel
2012-10-24 14:30           ` David MENTRE
2012-10-24 15:09             ` David MENTRE
2012-10-24 16:07               ` AW: " Gerd Stolpmann
2012-10-24 17:23                 ` Martin Jambon
     [not found]               ` <1351094817.12207.11@samsung>
2012-10-25  6:48                 ` David MENTRE
2012-10-25  7:37                   ` David House
2012-10-24 10:38 ` Török Edwin
2012-10-25 10:06   ` David MENTRE
2012-10-25 10:16     ` Török Edwin
2012-10-25 10:19       ` David MENTRE
2012-11-07 11:52     ` David MENTRE [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAC3Lx=YBCVs=D3MKUGM=GPRNLQHXpdpcHTg528NE96DEGWV+jA@mail.gmail.com' \
    --to=dmentre@linux-france.org \
    --cc=caml-list@inria.fr \
    --cc=edwin+ml-ocaml@etorok.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).