From: Robert Roessler <roessler@rftp.com>
To: Caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] On registering values for use in C
Date: Mon, 19 Feb 2007 14:29:38 -0800 [thread overview]
Message-ID: <45DA24D2.7070409@rftp.com> (raw)
In-Reply-To: <aee06c9e0702191037xd12079fxa8ab09ca6ea965a9@mail.gmail.com>
Nathaniel Gray wrote:
> I have a question about registering values for use in C. I've read
> that registering lots of values can have a bad effect on GC
> performance, but what about registering "large" values? For example,
> is registering a record with 20 fields just as bad as registering 10
> records with 2 fields each?
Having implemented "generational" GCs, I can make a generic comment on
this (without consulting the OCaml sources): as each one of the items
you register represents a "root" (for our purposes, a tree of items
which *may* or *may not* not be pointed to by any other item), there
is a certain amount of per-root overhead that gets amortized over the
items "marked" (or copied or whatever) during a GC. This being the
case, it is likely that your case of "a record with 20 fields" will be
"less bad" than your case of "10 records with 2 fields each".
Robert Roessler
roessler@rftp.com
http://www.rftp.com
prev parent reply other threads:[~2007-02-19 22:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-19 18:37 Nathaniel Gray
2007-02-19 22:29 ` Robert Roessler [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=45DA24D2.7070409@rftp.com \
--to=roessler@rftp.com \
--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;
as well as URLs for NNTP newsgroup(s).