caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Anthony Tavener <anthony.tavener@gmail.com>
To: Malcolm Matalka <mmatalka@gmail.com>
Cc: Raoul Duke <raould@gmail.com>, caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] concurrent gc?
Date: Wed, 23 Jul 2014 23:58:57 -0600	[thread overview]
Message-ID: <CAN=ouMRnaKkdR=y6csWX4r3UT9b7-Om1nL77ZAMtDgDD9WN00Q@mail.gmail.com> (raw)
In-Reply-To: <CAKziXDUFvMWVY+NzvxDrm+2wp21wW=ZEc=p-f6xe04rc9Edi8g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2492 bytes --]

I agree with Malcolm's experience, and my situation might be similar to
yours: games -- a lot of allocations at high framerate. I'm guessing this
from how evil you consider pauses to be. ;) In some circumstances I *have*
experienced hitching, which did turn out to be due to GC -- but then I'd
find I was creating a pathological case. You can't expect to throw a
completely arbitrary workload at the GC and expect it to remain invisible.
Just as with allocations by hand in C, even with sophisticated custom
allocators -- you still need to use dynamic allocations wisely. Here, I
think the biggest problem is when you have a GC, you lose awareness of the
allocations you're triggering.

I doubt I'd use OCaml to write the bulk of a leading-edge (in graphics
fidelity, framerate, and scene size) FPS game engine, competing with Unreal
or Crytek... but it's suitable for less intensive requirements. Then again,
one might follow the approach of FFTW and use OCaml to write a generator
which outputs a C-based renderer. :D


On Wed, Jul 23, 2014 at 9:45 PM, Malcolm Matalka <mmatalka@gmail.com> wrote:

> While it may not help you, ocamls GC only kicks off during an allocation
> so you can at least construct an important section of code to not have a GC
> occur in it.  But I don't think that would help for your situation.
>
> Is your concern more general or do you have a specific situation?  Ime it
> takes quite a but of work to cause a noticeable GC pause in ocaml.
> Den 24 jul 2014 02:09 skrev "Raoul Duke" <raould@gmail.com>:
>
> > Most programs spend a minority of their time in garbage collection.
>> > Even if the new GC thread did not slow down the main program,
>> > possible speedup would be less than 2x, probably well under 50%.
>>
>> thanks! gotchya.
>>
>> I should have noted that my main concern is with pauses, not with
>> overall speedup. In other words: in interactive apps, pauses are
>> eeeeeevil.
>>
>> > For technical reasons, offloading major collections in OCaml is easier
>> > than offloading minor collections, so the potential benefit is less.
>>
>> I am guessing you mean that major collections just don't happen that
>> often, at least if people write their code in a non-pathalogical
>> fashion? :)
>>
>> sincerely.
>>
>> --
>> 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
>>
>

[-- Attachment #2: Type: text/html, Size: 3447 bytes --]

  reply	other threads:[~2014-07-24  5:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 23:34 Raoul Duke
2014-07-24  0:05 ` John F. Carr
2014-07-24  0:08   ` Raoul Duke
2014-07-24  0:44     ` John F. Carr
2014-07-24  0:45       ` Raoul Duke
2014-07-24 15:24         ` Shayne Fletcher
2014-07-24  3:45     ` Malcolm Matalka
2014-07-24  5:58       ` Anthony Tavener [this message]
2014-07-28 11:20         ` Goswin von Brederlow
2014-07-24  6:58   ` Nicolas Boulay
2014-07-24  7:38     ` Malcolm Matalka
2014-07-24 15:36     ` Fabrice Le Fessant
2014-07-24 15:39       ` Malcolm Matalka
2014-07-24 16:44         ` Fabrice Le Fessant
2014-07-25  7:18           ` Nicolas Boulay
2014-07-28 11:26             ` Goswin von Brederlow
2014-07-28 11:24           ` Goswin von Brederlow
2014-07-28 17:34             ` Raoul Duke
2014-07-29  4:25               ` Gabriel Scherer
2014-07-29  4:49                 ` ygrek
2014-07-29 10:01                   ` Goswin von Brederlow
2014-07-29 10:29                     ` ygrek
2014-07-31 11:10                       ` Goswin von Brederlow
2014-07-29 17:23                 ` Raoul Duke
2014-12-19  0:58                   ` Jon Harrop
2014-07-31 14:26         ` Richard W.M. Jones

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='CAN=ouMRnaKkdR=y6csWX4r3UT9b7-Om1nL77ZAMtDgDD9WN00Q@mail.gmail.com' \
    --to=anthony.tavener@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=mmatalka@gmail.com \
    --cc=raould@gmail.com \
    /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).