quick C++ STL questions..

Discussion in 'Trading Software' started by EliteInterest, Jan 26, 2006.

  1. Hi elite,

    I'd be interested to here a comparative analysis of the Intel compiler. It's reported to be faster than gcc for most every situation.

    Also, its recommended when doing comparative analysis to do 100's, or better 1000's, of runs and take the average run.

    kt
     
    #31     Feb 15, 2006
  2. Yeah, its not entirely scientific, how I have done the tests.. however, for each configuration, I did run them a number of times to verify consistency and the results were nearly identical for each pass.. the latest test on x64/MinGW was showing (for example) 1.04 to 1.11 seconds for the last section - the results posted were just one pass taken at random.

    As far as the Intel compiler, I am very interested, but the Open Source version of QT4 for Windows seems to support only MinGW. It is not too terribly important for now, as I just need *reasonable* performance.. QT4 looks nicer for GUI work, than my past experiments with the evolving .NET/winforms solution.

    Looks like I can get a free eval. of the Intel Compiler to use with VS2003 - just requested the eval, and I'll give it a shot.

    Thanks.
     
    #32     Feb 15, 2006
  3. I'm sure there are various compiler options that can be changed to speed things up. Anyway, here are the first three passes, to give an unscientific approximation for comparison purposes:

    Code:
    Windows XP Pro, Visual Studio 2003, Intel Compiler 9.0.028
    
    
    It took: 0.000 seconds for this part: Program has been started
    It took: 1.406 seconds for this part: Data pushed to Vector, file closed
    It took: 0.765 seconds for this part: Add'l data calc's completed..
    It took: 8.110 seconds for this part: Trades finished..
    
    It took: 0.000 seconds for this part: Program has been started
    It took: 1.406 seconds for this part: Data pushed to Vector, file closed
    It took: 0.735 seconds for this part: Add'l data calc's completed..
    It took: 7.562 seconds for this part: Trades finished..
    
    It took: 0.000 seconds for this part: Program has been started
    It took: 1.390 seconds for this part: Data pushed to Vector, file closed
    It took: 0.750 seconds for this part: Add'l data calc's completed..
    It took: 7.469 seconds for this part: Trades finished..
    ..a bit disappointing, even though it is faster than MS's compilers.. so far GCC/MinGW are the big winners. Maybe I need to change compiler options. Why would the default compiler options for the Intel and Microsoft compilers be so slow, though?

    [edit] duh....... duh, I will try in 'release' mode. will post new results.
     
    #33     Feb 15, 2006
  4. snap!!

    Code:
    
    Windows XP Pro, Visual Studio 2003, Intel Compiler 9.0.028 in RELEASE mode :)
    
    
    It took: 0.000 seconds for this part: Program has been started
    It took: 0.515 seconds for this part: Data pushed to Vector, file closed
    It took: 0.047 seconds for this part: Add'l data calc's completed..
    It took: 0.406 seconds for this part: Trades finished..
    
    
    how much you wanna bet, I am a moron, and have to compile the Windows versions in Release mode :))) my inexperience reveals itself.. ahh the perils of self-taught trial-by-error. invariably, someone here read the previous results and said to themselves, "I bet he is compiling the Win versions in debug mode."

    Intel is the big winner!!

    -ei
     
    #34     Feb 15, 2006
  5. man, putting foot in mouth big time :) :)

    here:

    Code:
    Windows XP Pro, Visual Studio 2003, Stock VC7.1 Compiler in RELEASE mode :)
    
    
    It took: 0.000 seconds for this part: Program has been started
    It took: 0.515 seconds for this part: Data pushed to Vector, file closed
    It took: 0.047 seconds for this part: Add'l data calc's completed..
    It took: 0.359 seconds for this part: Trades finished..
    
    I am getting 0.515 consistently, and 0.359 to 0.375 or so..

    Snap!!

    [edit]the passes are VERY consistent now, here is another pass for VC7.1 compiler: 0.516, 0.047, 0.359 - only 1ms difference on one section.. maybe I can think about doing the 1000 passes and average, but does it matter now? probably not. I *know* someone was reading the results and didn't want to say anything (because its so obvious - but not to someone like me who is just learning)..

    MS VC7.1 is the big winner!
     
    #35     Feb 15, 2006
  6. I can certainly relate. It's tough. Let me express my biggest pet-peeve...

    If only some would take in to consideration, a little more thought and organization in their documentation.

    It would not take but a little bit of extra effort to provide such well organized and thoughtful documentation.

    Grrrrrrrr....:mad:
    kt
     
    #36     Feb 15, 2006
  7. Code:
    Windows XP Pro x64, Visual Studio 2005 Express, Stock VC8.0 Compiler in RELEASE mode.......
    
    It took: 0.000 seconds for this part: Program has been started
    It took: 0.500 seconds for this part: Data pushed to Vector, file closed
    It took: 0.062 seconds for this part: Add'l data calc's completed..
    It took: 0.500 seconds for this part: Trades finished..
    
    again, these are very consistent, pass-to-pass.. managed to squeak out a 0.484, 0.078, 0.484...

    I'll put on my dunce hat and take a time-out now. :)

    ps - tried using max optimizations for MinGW - still slower than the Intel/VC7.1/8.0's...
     
    #37     Feb 15, 2006
  8. yeah it was clearly explained in the Intel Compiler Tutorial: "Here, try the sample in Debug. NOW TRY Release mode!! :)"
     
    #38     Feb 15, 2006
  9. QT 4.1.0 is awesome, but writing GUI apps is much more involved than I thought.. and QT makes it easy too. Can't even imagine doing this with other solutions.

    Have to add logic so the CSV import wizard 'guesses' which columns correspond to which datafields. It's a never ending pit, this programming thing - and I haven't even done much yet, but am learning a tremendous amount by just 'doing it'. This little wizard is like 800 lines of (primarily) QT code, argh - will probably be around 1200-1500 lines when finished.

    <img src="http://i2.photobucket.com/albums/y12/e647g9i/20050220-chart_shot.png"></img>
     
    #39     Feb 20, 2006
  10. QT can emulate the toolkits of other platforms at runtime, with a command line parameter:


    Motif:
    <img src="http://i2.photobucket.com/albums/y12/e647g9i/20050220-chart_shot_motif.png"></img>
     
    #40     Feb 20, 2006