-
I have not profiled the code yet, but I did just port it to my Win XP SP2 machine on a Dell desktop 5100C, 3.1ghz machine. OMG. It ran for 2 minutes, 15 seconds (vs the 10 seconds on my Mac). Visual C++ 6.0, running with default compiler options for a Win Console Application. Ugggggg.
Todd
-
Phew.
I set the Active Build in VC++ to Release and reran. 14 seconds. I'm OK with that!! Time to start profiling.
Todd
-
Move up to a updated compiler (What ever the free version of visual studio is now, 2008 I think it is, or MinGW if you want an open source compiler) and possibly you will see better results due to advancements in the compiler optimizations themselves, also be sure you are optimizing for speed not executable size, you may be able to get a bit more out of your application that way.
-
Default release config is "optimize for speed", not for size. For larger applications, optimize for size may actually give better results (because the code takes up less space and thus gives better cache-hit ratio). For small applications, where the executable file is less than a few hundred K, then the optimize for size is probably the "wrong" setting.
--
Mats
-
Yes, I have Visual C++ Express downloaded and installed, but picked this since it was the first one I saw in my programs list. I haven't done any optimizing yet.
Thanks. Todd
-
The current size of the Windows .exe is 236KB. Fairly smallish.
Todd
-
In your linker settings, add "/OPT:REF /OPT:NOWIN98" and make sure your linking with the DLL version of the CRT - you're app should get a lot smaller (assuming you don't need to run on 98).
gg
-
Thanks. Will look that up and add it this evening.
Todd
-
I typically use Link Time Code Generation (which works with Full Optimization) to ensure best optimization (or so I would believe) and not speed nor size.