[Shootout-list] Re: [Caml-list] [FP performance] Ocaml sums the harmonic series

Christophe TROESTLER Christophe.Troestler at umh.ac.be
Sun Apr 23 22:57:07 UTC 2006


On Sat, 15 Jan 2005, Xavier Leroy <Xavier.Leroy at 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



More information about the Shootout-list mailing list