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
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: 2005-01-23 (06:08)
From: Will M. Farr <farr@M...>
Subject: Re: [Caml-list] Ocaml sums the harmonic series -- four ways, four benchmarks: floating point performance
Hash: SHA1

I'm running 10.3.7 -- I don't think there's any newer version.  When I 
run harmonic4 as follows:

time ./harmonic 1000000000

real    1m3.764s
user    1m0.590s
sys     0m0.130s

the above is what I get.  I'm not sure why I'm not exactly 2x faster 
than you, but there's plenty of things which could affect that.

Running the bytecode on my system gives:

time ./harmonic.bc 1000000000

real    11m51.239s
user    11m11.600s
sys     0m0.940s

I would be pretty surprised to see the bytecode come even close to the 
native code version --- are you sure about the numbers on your system?


On 22 Jan 2005, at 9:27 PM, Oliver Bandel wrote:

> I tried harmonic4 on Powerbook G4, 400 MHz and the
> native-code needs  about 1 min 50s.
> The Bytecode for harmonic4 runs in about 1min 53 s.
> It seems that there is no real distinction between
> bytecode and native code. At least on that system,
> #or at least on that task.
> I use Panther OS. It seems that it's more than twice as fast as your OS
> (look at the processor frequency: 400 MHz on my PB G4, 800 MHz on 
> yours...).
> Which OS are you running? An older version of Mac-OS-X? Or Linux? 
> (which one?)
> Maybe you can speed-up your calculations a lot, when installing a 
> different
> operating system on your computer.
> I didn't try the other implementations.
> IMHO you can gain more performance easier, when
> changing your OS. Easier than looking at some code optimizations...?!
>                                    (which you nevertheless can do too)
> Ciao,
>    Oliver
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
Version: GnuPG v1.4.0 (Darwin)