* x86 vs AMD64 OCaml compiler performance
@ 2005-07-06 2:53 Jon Harrop
2005-07-06 6:44 ` [Caml-list] " Florian Hars
2005-07-06 17:16 ` Robert Roessler
0 siblings, 2 replies; 6+ messages in thread
From: Jon Harrop @ 2005-07-06 2:53 UTC (permalink / raw)
To: caml-list
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.
Any ideas why?
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Technical Presentation Software
http://www.ffconsultancy.com/products/presenta
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] x86 vs AMD64 OCaml compiler performance
2005-07-06 2:53 x86 vs AMD64 OCaml compiler performance Jon Harrop
@ 2005-07-06 6:44 ` Florian Hars
2005-07-06 16:20 ` Jon Harrop
2005-07-06 17:16 ` Robert Roessler
1 sibling, 1 reply; 6+ messages in thread
From: Florian Hars @ 2005-07-06 6:44 UTC (permalink / raw)
To: Jon Harrop; +Cc: caml-list
Jon Harrop wrote:
> Any ideas why?
You have doublechecked that you always use either ocamlopt or ocamlopt.opt,
but not accidentally one for x86 and the other for amd64? This would explain
the factor of approximately 5 you see...
Yours, Florian.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] x86 vs AMD64 OCaml compiler performance
2005-07-06 6:44 ` [Caml-list] " Florian Hars
@ 2005-07-06 16:20 ` Jon Harrop
0 siblings, 0 replies; 6+ messages in thread
From: Jon Harrop @ 2005-07-06 16:20 UTC (permalink / raw)
To: caml-list
On Wednesday 06 July 2005 07:44, Florian Hars wrote:
> You have doublechecked that you always use either ocamlopt or ocamlopt.opt,
> but not accidentally one for x86 and the other for amd64? This would
> explain the factor of approximately 5 you see...
You are quite right - I think only ocamlc on the AMD64 had been compiled to
native code because it is the only executable that "ldd" will run on.
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Technical Presentation Software
http://www.ffconsultancy.com/products/presenta
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] x86 vs AMD64 OCaml compiler performance
2005-07-06 2:53 x86 vs AMD64 OCaml compiler performance Jon Harrop
2005-07-06 6:44 ` [Caml-list] " Florian Hars
@ 2005-07-06 17:16 ` Robert Roessler
2005-07-06 17:31 ` Jon Harrop
1 sibling, 1 reply; 6+ messages in thread
From: Robert Roessler @ 2005-07-06 17:16 UTC (permalink / raw)
To: Jon Harrop, Caml-list
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? :)
Robert Roessler
roessler@rftp.com
http://www.rftp.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] x86 vs AMD64 OCaml compiler performance
2005-07-06 17:16 ` Robert Roessler
@ 2005-07-06 17:31 ` Jon Harrop
2005-07-06 19:18 ` Christopher Campbell
0 siblings, 1 reply; 6+ messages in thread
From: Jon Harrop @ 2005-07-06 17:31 UTC (permalink / raw)
To: Caml-list
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
http://www.ffconsultancy.com/products/presenta
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] x86 vs AMD64 OCaml compiler performance
2005-07-06 17:31 ` Jon Harrop
@ 2005-07-06 19:18 ` Christopher Campbell
0 siblings, 0 replies; 6+ messages in thread
From: Christopher Campbell @ 2005-07-06 19:18 UTC (permalink / raw)
To: Jon Harrop; +Cc: Caml-list
Jon Harrop wrote:
> 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.
You probably have, but I'll ask anyway. Have you checked the heatsink
is seated properly and the case has suitable airflow? I have a Athlon64
3200 (Winchester) with a 6600GT in a room with a combi boiler in the
cupboard and it's always bloomin' hot in here but the system never
crashes and dies. Mind you, it has a smaller cache and I don't live in
Cambridge (unfortunately I live in damp dreach Glasgow).
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-07-06 19:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-06 2:53 x86 vs AMD64 OCaml compiler performance Jon Harrop
2005-07-06 6:44 ` [Caml-list] " Florian Hars
2005-07-06 16:20 ` Jon Harrop
2005-07-06 17:16 ` Robert Roessler
2005-07-06 17:31 ` Jon Harrop
2005-07-06 19:18 ` Christopher Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox