> For occasional hotspots where naked integers are essential for
> performance, wouldn't the easiest solution be to use the equivalent of
> GHC's unboxed ints: a special _non-polymorphic_ datatype that doesn't
> have tags. This type would be given a kind different from other types
> to
> prevent it from being used as a type parameter. Of course the GC still
> needs to be prevented from following such values, but a separate stack
> for them ought to do the trick.
Untagged non-pointers on the stack are already identified by frame
descriptors.
Something like that but less restrictive could probably be implemented
as optimized calling conventions for int32/int64 when explicitly
specified.
Native-sized integers are currently handled unboxed locally inside
functions, they just require boxing when stored in a block, passed as
parameters or returned. Using them is pretty inconvenient, though.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners