English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net

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