Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
RE: [Caml-list] Bug? Printf, %X and negative numbers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-04-03 (17:40)
From: Ville-Pertti Keinonen <will@e...>
Subject: Re: [Caml-list] Bug? Printf, %X and negative numbers

> 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 

Something like that but less restrictive could probably be implemented 
as optimized calling conventions for int32/int64 when explicitly 

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 Archives:
Bug reports: FAQ:
Beginner's list: