Version française
Home     About     Download     Resources     Contact us    
Browse thread
Ocaml sums the harmonic series -- four ways, four benchmarks: floating point performance
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe TROESTLER <Christophe.Troestler@u...>
Subject: Re: [Caml-list] [FP performance] Ocaml sums the harmonic series
On Sat, 15 Jan 2005, Xavier Leroy <Xavier.Leroy@inria.fr> wrote:
> 
>     !sum +. 0.0;;
> 
> The + 0.0 at the end is ugly but convinces ocamlopt that !sum is
> best kept unboxed during the loop.

Since it always has a positive impact (at least w.r.t. the program
without it), would it be possible for ocamlopt to be convinced that it
is a good thing without having to write such a hack?  Or are there
reasons why it is difficult to do?

Best regards,
ChriS