From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Alain Frisch <alain.frisch@lexifi.com>
Cc: 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:26:08 +0100 [thread overview]
Message-ID: <1361809568.3218.19.camel@thinkpad> (raw)
In-Reply-To: <512B872B.60809@lexifi.com>
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.
------------------------------------------------------------
next prev parent reply other threads:[~2013-02-25 16:25 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 [this message]
2013-02-25 16:32 ` Gabriel Scherer
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=1361809568.3218.19.camel@thinkpad \
--to=info@gerd-stolpmann.de \
--cc=alain.frisch@lexifi.com \
--cc=berenger@riken.jp \
--cc=caml-list@inria.fr \
/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