From: Brighten Godfrey <pbg@cs.berkeley.edu>
To: Markus Mottl <markus.mottl@gmail.com>,
Damien Doligez <damien.doligez@inria.fr>
Cc: OCaml List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Strange performance bug
Date: Wed, 29 Apr 2009 12:19:01 -0700 [thread overview]
Message-ID: <25CD1992-3F33-4AEA-97A3-EC54729EC4FE@cs.berkeley.edu> (raw)
In-Reply-To: <f8560b80904290903sdfb97fdr785def77f1c82712@mail.gmail.com>
On Apr 29, 2009, at 9:03 AM, Markus Mottl wrote:
> On Wed, Apr 29, 2009 at 10:48, Damien Doligez
> <damien.doligez@inria.fr> wrote:
>> Markus, you put your finger right on the problem. That program
>> doesn't
>> suddenly start to get slow, it gets steadily slower as it runs. The
>> heap also gets steadily bigger, and the major GC does way too much
>> work.
>
> Right, the combination of forcing the GC very often through PCRE and
> keeping an ever increasing number of values around obviously leads to
> this slowdown.
Makes sense. (Though, i'd point out that there *are* discrete moments
of sudden slowdown -- after each parse completes. Maybe the GC
doesn't scan through the results until they are returned by the parse
function...?)
>> Maybe PCRE should change its settings to trigger GCs less often but,
>> as Markus said, this doesn't look really important.
>
> I've never seen a case in practice where correctly done regexp
> allocations happen so often that excessive full major collections are
> triggered. There is no optimal "general" setting for how aggressive
> the GC should be with regexps, but the current value should work fine
> for just about anybody. A still reasonable higher setting would
> probably not solve performance bugs of the sort above anyway.
You seem to have solved my problem. But out of curiosity: Do you
know how the GC settings in the Str library differ from PCRE's, and
why? Why does PCRE need to explicitly trigger GCs at all?
Thanks for your replies,
~Brighten
next prev parent reply other threads:[~2009-04-29 19:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-29 2:43 Brighten Godfrey
2009-04-29 3:37 ` [Caml-list] " Markus Mottl
2009-04-29 4:31 ` Brighten Godfrey
2009-04-29 6:18 ` Alain Frisch
2009-04-29 6:27 ` Brighten Godfrey
2009-04-29 6:37 ` Alain Frisch
2009-04-29 8:29 ` Brighten Godfrey
2009-04-29 13:58 ` Markus Mottl
2009-04-29 14:48 ` Damien Doligez
2009-04-29 16:03 ` Markus Mottl
2009-04-29 19:19 ` Brighten Godfrey [this message]
2009-04-29 19:38 ` Markus Mottl
2009-04-29 20:23 ` Brighten Godfrey
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=25CD1992-3F33-4AEA-97A3-EC54729EC4FE@cs.berkeley.edu \
--to=pbg@cs.berkeley.edu \
--cc=caml-list@yquem.inria.fr \
--cc=damien.doligez@inria.fr \
--cc=markus.mottl@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