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] 32 bit floats, SSE instructions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-06-08 (11:18)
From: skaller <skaller@u...>
Subject: RE: [Caml-list] 32 bit floats, SSE instructions
On Tue, 2004-06-08 at 18:10, Ennals, Robert wrote:
> [snip]

> While a GC does need to have some way to distinguish between pointers
> and data, this is not the only way that this can be done. Another
> approach (used by GHC) is to dispense with tag bits and instead store a
> bitmask for each datatype and each stack layout, indicating which fields
> are pointers.
> I don't know much about the relative advantages/disadvantages of the two
> approaches, but there is definitely a design space to be explored, and
> it is definitely possible to have native 32 bit floats in a garbage
> collected language.

Felix uses an array of offsets to locate pointers.
And in Felix all types are fully expanded (except in sums
due to a design stupidity in C++).

A disadvantage of the offsets approach is that
Felix pointers and C pointers can't be mixed
in polymorphic functions operating on pointer to T:
the distinction is entirely static. In Ocaml, the
check is done at run time -- meaning less code bloat
and a small performance hit.

Expanded types provide superior efficiency
in some cases, and of course include boxing (pointers)
as a special case and so subsume systems that only box.

John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: