Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
-m64 flag and performance on Core2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-m64 flag and performance on Core2


I'm working on a C++ rendering app with mostly single-precision floating point calculations. Performance on a G5 is pretty decent, but a simple recompile for i386 showed very poor performance on a Core2 iMac -- it runs about half as fast on the Intel.

The only compiler flags that really made a difference were "-m64" or "-arch x86_64". With these options the iMac was just as fast as the G5. As I understand it, I can't have a GUI app (yet) with 64-bit addressing turned on.

Can someone of you give me insight as to why the code is so much faster with these options? I suspect that the memory addressing is not the cause, but some Intel EM64T instructions are. Can I exploit that in a 32-bit app?

By the way: I also tried the Intel compiler, and its output was about ten times slower than with GCC! Maybe it is because my code makes use of some heavy template expression magic which ICC doesn't like. Does anyone share this experience?

Thanks in advance and best regards,

Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.