x86_64 question

x86_64 question

Hi, there's something I don't understand about intel compiler on my linux x64 platform...I'm quite lost in cpu architectures/instruction sets, so the answer is probably simple, it's just that I can't find it anywhere written explicitly.

I installed Free Intel compiler 10.1 for Linux (distribution which is marked as Intel64) on my Ubuntu 7.10 x86_x64 system(Core2Duo cpu).
I have a piece of code that works intensively with 64-bit integers, so I would expect big speedup on a 64bit system.

When i compiled the source with -O2(no other parameters), i found out that the performance is indeed good, but what made me wonder was that even if I set pentium3 as target(with march=pentium3 and pentium3 is clearly having no 64bit instruction set support), the performance stays roughly the same. My conclusion: compiler is still generating IA32 code, perhaps with some sse and vectorization stuff which speeds things up. But if I'm right, how can I generate 64-bit code?

Thanks for any advice ;)
And Happy New Year btw.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Even if your perception is correct about your "code that works intensively with 64-bit integers," there may be more to it than that. First, with vectorization, you are using 64-bit instructions where it counts, even though you are using 32-bit addressing. Second, your code could be spending time on operations other than those where performing a single 64-bit operation rather than 2 or more 32-bit operations makes little difference. Among the usual ways to get answers to such questions is to run a profiler like PTU (see the WhatIf forum).

Leave a Comment

Please sign in to add a comment. Not a member? Join today