[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Robert Roessler <roessler@r...> |
| Subject: | Re: [Caml-list] On registering values for use in C |
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