--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e
My mistake: I got a link from a comment on the project plan and not from the
plan itself:
http://www.opensource.apple.com/darwinsource/10.5.5/autozone-77.1/
It refers to a conservative GC.
I recently added a precise GC to my HLVM project that is built upon LLVM. I
see that your overall objectives are as pragmatic as my own so it would
probably be very constructive to discuss designs.
My current GC is non-moving non-compacting non-incremental non-generational
mark and sweep using calloc and free directly and a shadow stack to record
local roots. I wrote it in a couple of days. The only unusual aspect is that
the code to traverse a value type is generated and JIT compiled on-the-fly as
new value types are encountered (e.g. tuples). That allowed me to use a
non-uniform representation and avoid boxing whenever possible which is
essential if I am to obtain optimal performance for numeric and string
processing (which is one of my main goals). It also means that HLVM jumps
directly to values of reference types rather than traversing every word at
run-time as OCaml's GC must.
Many people including the developers of Haskell compilers and Xavier Leroy
(lead dev of OCaml) asserted that such an approach would be extremely slow
and that using the system stack via stack maps (i.e. LLVM's GC intrinsics) is
essential in order to obtain usable performance. Consequently, I did not
expect to get within an order of magnitude of the most heavily optimized
single-threaded moving incremental generational GCs such as OCaml's. However,
HLVM is actually only 2.15x slower than ocamlopt on an allocation- and
GC-intensive list-based 10-queens solver.
May I ask what your plan is with regard to preserving the deterministic
collection of objects in today's Python? Will you break backward
compatibility in that respect?
Regards,
May I ask what your plan is with regard to preserving the deterministic
collection of objects in today's Python? Will you break backward
compatibility in that respect?