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-09 (16:14)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] 32 bit floats, SSE instructions
> 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.

ocamlopt does that for stack frames, but not for heap-allocated
blocks.  I used the approach you describe (heap blocks containing
mixtures of pointers and raw data) in the Gallium experimental
compiler (which later morphed into ocamlopt), but it makes GC
significantly slower, which is a pity given that this feature is
rarely used: especially in symbolic computation, where GC times are
critical, most data structures are "pointers only" or "raw bits only".

Heap-allocating 3- or 4-vectors or 3x3- or 4x4 matrixes of floats is
quite reasonable, however, and probably what the OP really wants
although he denies it vehemently :-)

- Xavier Leroy

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