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
x86 vs AMD64 OCaml compiler performance
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-07-06 (17:33)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] x86 vs AMD64 OCaml compiler performance
On Wednesday 06 July 2005 18:16, you wrote:
> Jon Harrop wrote:
> > I just timed recompilation of my latest project to both byte code and
> > native code on both 900MHz Athlon t-bird and 800MHz Athlon64. To my
> > suprise, compilation to native code takes roughly the same amount of time
> > on both computers but compilation to byte code is slightly faster (1m18
> > vs 1m40) on x86 but vastly faster (21s vs 1m50) on AMD64.
> Ummm... do you mean "1800MHz" or "1.8GHz" for the Athlon64? :)

No, I got that bit right - 800MHz (downclocked for the muggy summer). Running 
at 1.8GHz it compiles in 9s but overheats and switches off after a few 
minutes, especially when the GPU is working like a Trojan.

With compilers compiled to native code I now get:

              ocamlc ocamlopt
800MHz AMD64     18s      24s
1.8GHz AMD64      9s      12s
900MHz Athlon    27s      34s

I'd have expected the compilers to be doing mostly tree manipulation so I was 
expecting the AMD64 to perform poorly, as the tree-intensive Set.union was 
the only benchmark where my AMD64 was slower in 64-bit mode than in 32-bit 
mode. In fact, the AMD64 is no slouch.

The vast majority of the time is spent compiling only a few of the source 
files. Four of them are autogenerated and just contain 300kB of data each, so 
it's no surprise those are slow. The other is my implementation of a scene 
graph. Although it is very elegant and actually works very well, many of the 
types are half a page long, so my guess is that the time is spent in the type 
system there.

Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Technical Presentation Software