Browse thread
caml_oldify_local_roots takes 50% of the total runtime
[
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: | Brian Hurt <bhurt@j...> |
| Subject: | Re: [Caml-list] caml_oldify_local_roots takes 50% of the total runtime |
Hendrik Tews wrote: >Gerd Stolpmann <info@gerd-stolpmann.de> writes: > > Global roots are for pointers that are outside the heap for a long time. > I think these could be handled more efficiently by the GC, e.g. by > moving global roots to a second list when the object referenced by the > pointer is moved to the major heap. > >I destilled this thread into two feature wishs: 4145, 4146. > >Hendrik > >_______________________________________________ >Caml-list mailing list. Subscription management: >http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list >Archives: http://caml.inria.fr >Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >Bug reports: http://caml.inria.fr/bin/caml-bugs > > > > With respect to 4146 (minor heap size adjusts to memory size)- I'm not sure this is a good idea. 32K is small enough to fit into L1 cache with space left over on pretty much all systems these days (64K L1 cache seems to be standard). Having the minor heap small enough to fit into L1 cache, and thus having the minor heap live in L1 cache, seems to me to be a big advantage. If for no other reason than it makes minor collections a lot faster- the collector doesn't have to fault memory into cache, it's already there. If anything, I'd be inclined to add more generations. I haven't done any timings, but my first guess for reasonable values would be: Gen1 (youngest): 32K (fits into L1 cache), Gen2: 256K (fits into L2 cache), Gen3: 8M (fits into memory), Gen4 (oldest): as large as necessary. Brian