Quote from EliteInterest:
Firstly, I am a bit surprised that no-one was willing to give a helping hand with my simple coding question, given the level of expertise that permeates from the vast amount of 'code philosophizing' that takes place in other threads. No big deal, I will probably have to rethink how to structure my data for efficiency and reusability as the ideas expand.
I thought this was a worthwhile note and just wanted to pass it along:
I installed VS2005 Express - the free IDE from M$, and compiled/ran my code, which reads data from text files, and performs numerous calculations on OHLC data, based on various input variables.. Guess what? Ran approx. THREE TIMES as slow as the version compiled using VS2003 (VC71). Very disappointing. Maybe I have configured the compiler or IDE wrong - but what is there to configure? I just installed it normally and loaded my code. Shocked, to say the least. Maybe it is a 'dumbed down' version, being free, but I don't see why they would do that...
Now, here is the real kicker. I am experimenting with different free/not-so-free Linux distros.. currently mucking about with RHAT EL WS v4.. (nice and stable). So I figured, what the hell, let's see how Linux performs. I loaded the code, made a few very minor adjustments that were M$ specific (not pertinent to the bulk of the calculations or loading of the STL containers, etc.), compiled, and ran. WOW! It has to be approx. 3-5 times faster than the VC71 compiled version, and therefore approximately 9-15 times faster than the VC80 compiled version.
Thought you Linux addicts might enjoy such news.
The only notable difference that I can think of: I am using the x86_64 kernel on a Xeon 64-bit chip, but I did try using VS2005Express under XP Pro x64 - still slow as hell in comparison. I am not totally sure what difference this even makes - I guess to have a clean comparison, I could try a x86 based Linux kernel.. but does that even matter? My code is pretty standard stuff, using built-in types: ints, floats, double, etc.. no 64-bit precision going on here.. I am trying to make a case for Linux over Windows, speed of execution being a critical factor.. I still prefer Windows in some ways - GUI is clean, fast, and simple to use, but Linux might have some compelling advantages.. btw: I used KDevelop to 'port' (whatever that means - just changed a few lines) the source from Windows.. I'll keep toying with RHAT and try some others (commerical Novell or free SUSE come to mind)..