For Dann Corbit - Compiler Optimisation Question

Archive of the old Parsimony forum. Some messages couldn't be restored. Limitations: Search for authors does not work, Parsimony specific formats do not work, threaded view does not work properly. Posting is disabled.

For Dann Corbit - Compiler Optimisation Question

Postby Ross Boyd » 01 Aug 2004, 09:54

Geschrieben von:/Posted by: Ross Boyd at 01 August 2004 10:54:57:

Hi Dann,
Maybe this is on the verge of being OT but I'm sure some WB programmers would be interested in your reply. Your reputation precedes you as an itinerant tweaker hence my question is directed to you.
I have recently upgraded my lowly P3-450 to XP for the simple benefit of being able to run the _free_ MSVC++ Toolkit 2003. Previously TRACE was compiled with Borland's _free_ BCC55 which is clearly slower than MSVC.
Now that everything is compiling sweetly under MSVC, would you care to share your favourite compiler switches?
Currently I use this...
cl /G6 /EHs /EHc /Ox /Gr /Oy /Ob2 trace.cpp
It gives me about 16% speed improvement over BCC55... but I want MORE!!
All of TRACE's code is 'included' in the one source file in the hope that the global optimisations will work some magic...
Thanks in advance for your help!
Ross
Ross Boyd
 

Re: For Dann Corbit - Compiler Optimisation Question

Postby Dann Corbit » 02 Aug 2004, 21:18

Geschrieben von:/Posted by: Dann Corbit at 02 August 2004 22:18:28:
Als Antwort auf:/In reply to: For Dann Corbit - Compiler Optimisation Question geschrieben von:/posted by: Ross Boyd at 01 August 2004 10:54:57:
Hi Dann,
Maybe this is on the verge of being OT but I'm sure some WB programmers would be interested in your reply. Your reputation precedes you as an itinerant tweaker hence my question is directed to you.
I have recently upgraded my lowly P3-450 to XP for the simple benefit of being able to run the _free_ MSVC++ Toolkit 2003. Previously TRACE was compiled with Borland's _free_ BCC55 which is clearly slower than MSVC.
Now that everything is compiling sweetly under MSVC, would you care to share your favourite compiler switches?
Currently I use this...
cl /G6 /EHs /EHc /Ox /Gr /Oy /Ob2 trace.cpp
It gives me about 16% speed improvement over BCC55... but I want MORE!!
All of TRACE's code is 'included' in the one source file in the hope that the global optimisations will work some magic...
Thanks in advance for your help!
Different binaries want different flag combinations. This is pretty good to start with, especially for a small code base:
/Ox /Og /Ob2 /Oi /Ot /Oy /GT /GL /I "C:\Program Files\Microsoft SDK\Include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /GF /FD /EHsc /MT /Zp16 /Gy /fp:fast /Fo".\Release/" /Fd".\Release/" /W4 /nologo /c /TP
Your Windows.h include file might be somewhere else than "C:\Program Files\Microsoft SDK\Include" so 'season to taste'



my ftp site {remove http:// unless you like error messages}
Dann Corbit
 

Re: For Dann Corbit - Compiler Optimisation Question

Postby Ross Boyd » 04 Aug 2004, 00:17

Geschrieben von:/Posted by: Ross Boyd at 04 August 2004 01:17:29:
Als Antwort auf:/In reply to: Re: For Dann Corbit - Compiler Optimisation Question geschrieben von:/posted by: Dann Corbit at 02 August 2004 22:18:28:
Hi Dann,
Maybe this is on the verge of being OT but I'm sure some WB programmers would be interested in your reply. Your reputation precedes you as an itinerant tweaker hence my question is directed to you.
I have recently upgraded my lowly P3-450 to XP for the simple benefit of being able to run the _free_ MSVC++ Toolkit 2003. Previously TRACE was compiled with Borland's _free_ BCC55 which is clearly slower than MSVC.
Now that everything is compiling sweetly under MSVC, would you care to share your favourite compiler switches?
Currently I use this...
cl /G6 /EHs /EHc /Ox /Gr /Oy /Ob2 trace.cpp
It gives me about 16% speed improvement over BCC55... but I want MORE!!
All of TRACE's code is 'included' in the one source file in the hope that the global optimisations will work some magic...
Thanks in advance for your help!
Different binaries want different flag combinations. This is pretty good to start with, especially for a small code base:
/Ox /Og /Ob2 /Oi /Ot /Oy /GT /GL /I "C:\Program Files\Microsoft SDK\Include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /GF /FD /EHsc /MT /Zp16 /Gy /fp:fast /Fo".\Release/" /Fd".\Release/" /W4 /nologo /c /TP
Your Windows.h include file might be somewhere else than "C:\Program Files\Microsoft SDK\Include" so 'season to taste'
Hi Dann, that helped!
Its now half a percent faster.... every little bit counts. I wonder if it makes sense to release an executable for each CPU type - or - just use the 'Blended' option. I'll do some tests.
Thanks for your tips!
Ross
Ross Boyd
 


Return to Archive (Old Parsimony Forum)

Who is online

Users browsing this forum: No registered users and 25 guests