caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Alain Frisch <alain.frisch@lexifi.com>
Cc: Gerd Stolpmann <info@gerd-stolpmann.de>,
	Francois Berenger <berenger@riken.jp>,
	caml-list@inria.fr
Subject: Re: AW: [Caml-list] What is triggering a lot of GC work?
Date: Mon, 25 Feb 2013 17:32:33 +0100	[thread overview]
Message-ID: <CAPFanBE7xveakSOhZNsOWWgH6LgPi87bakA=nUw-rXiVzCb0Ew@mail.gmail.com> (raw)
In-Reply-To: <512B872B.60809@lexifi.com>

Thanks for the friendly poking. I did get some code (I've actually
been surprised by how dedicated some submitters one, eg. Edwin Török),
but my plate has been full non-stop since and I haven't yet taken the
time to put this into shape. It's on my TODO list and I hope to share
some results in the coming weeks.

Regarding the interesting battle story from Gerd, my own idea was to
"oldify" the values before inserting them in the array, in order not
to fire the write barrier. Oldifying values is costly as well, so I'm
not sure if that's interesting if the array is long-lived but the
elements short-lived. And more importantly, the oldifying interface
is, to my knowledge, not exposed to end-users (while it's possible
through the C interface to allocate directly in the old region), so
this cannot be written and tested without ugly hacks right now. I'd
still be curious to know how this solution would compare to the
others.

On Mon, Feb 25, 2013 at 4:45 PM, Alain Frisch <alain.frisch@lexifi.com> wrote:
> 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.)
>
>
>
> 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?  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
>
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

  parent reply	other threads:[~2013-02-25 16:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-25  2:08 Francois Berenger
2013-02-25  8:02 ` Mark Shinwell
2013-02-25 10:32   ` ygrek
2013-02-26  3:46     ` Francois Berenger
2013-02-26  4:29       ` ygrek
2013-02-25 13:31 ` AW: " Gerd Stolpmann
2013-02-25 15:45   ` Alain Frisch
2013-02-25 16:26     ` Gerd Stolpmann
2013-02-25 16:32     ` Gabriel Scherer [this message]
2013-02-25 16:52       ` [Caml-list] OCaml benchmarks Török Edwin

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='CAPFanBE7xveakSOhZNsOWWgH6LgPi87bakA=nUw-rXiVzCb0Ew@mail.gmail.com' \
    --to=gabriel.scherer@gmail.com \
    --cc=alain.frisch@lexifi.com \
    --cc=berenger@riken.jp \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    /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).