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
[Bug] Different behavior bytecode/nativecode
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-02-27 (10:13)
From: Christophe TROESTLER <Christophe.Troestler@u...>
Subject: Re: [Caml-list] [Bug] Different behavior bytecode/nativecode
On Sun, 27 Feb 2005, Jon Harrop <jon@jdh30.plus.com> wrote:
> The problem is the conflict of interests between having ocamlc and
> ocamlopt behave identically, and having ocamlopt-compiled code
> achieve good performance. In floating-point code, ocamlopt can
> sometimes generate slightly different results from ocamlc.
>   http://caml.inria.fr/caml-list/1147.html

Thanks for the pointer.

>  Specifically, your code is numerically unstable

Yes, I know about this but was blind-sighted by the different results
of the two compilers... :(   (I checked the values of "cr" where
identical but not with enough precision...)

> ocamlopt is generating x86 code which is partly performed in 80-bit
> registers and partly stored in 64-bit memory locations

Are there general rules about this: does a "let" necessarily put the
result into 64-bit memory (as an assignment in C does) or is it more
complicated (e.g. due to inlining)?

Thanks for quickly finding my mistake!