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
Optimizing Float Ref's
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-09-03 (09:44)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] Optimizing Float Ref's
> I'm running OCaml 3.11.1, and I noticed something strange in some native 
> code for matrix multiply today.  The code was
> [...]
> [Local float ref being unboxed or not? ]

You omitted the definition of "dims", but after adding the obvious
definition, the float ref "sum" is indeed completely unboxed and is
kept in a float register (on x86-64 bits) or stack location (on x86-32
bits).  No "modify" takes place in the inner loop.  So, I don't
understand the problem you observed.  Feel free to post a report on
the BTS with a *complete* piece of code that reproduces the problem.

> But, I thought that float ref's were automatically unboxed by the 
> compiler when they didn't escape the local context.

Yes, if all uses of the float ref are unboxed, which is the case in
your code.

- Xavier Leroy