C++ Compilers.

Discussion in 'Trading Software' started by bespoke, Feb 23, 2008.

  1. bespoke


    I hope this isn't too dumb a question. Does the type of compiler you use affect the umm.. end product? Such a speed and the like.

    When I learned C/C++ we were using TurboC in DOS. I'm just now returning to C++ and I find VC difficult to use, but BCB much easier for designing in Windows. Will the end result be different?

    It's for high frequency (1000+ executions daily), multiple strategy automation. I'm using another language now (VB) but I feel like it gets bogged up at times and lags. Sometimes as the day goes on and especially when volume increase a lot. And I plan to expand with more strategies in the future so I presume C++ may help relieve my problems as I can't see how I can possibly make my VB code more efficient.

    My guess is that it doesn't make a difference but I never read about people using BCB and wondering why since it's so easy to use.
  2. wenzi


    Wow, you can still get the Borland Compiler?

    I heard they also have Delphi for PHP if you want to try that.
  3. Before you go rewriting things, have you profiled your current code ?

    I doubt that which C++ compiler you might choose will make a material difference. Having said that, the Intel compiler is reputedly the fastest on Intel CPUs but not necessarily on AMDs.

    Same old story - it's the design and algorithms that count and now that multi-core CPUs are dirt cheap, your ability to write decent reliable multi-threaded code.

    If you are dealing with a lot of time series that use a lot of memory, there are real performance gains to be had by choosing the CPU with the biggest L2 cache. New Intel C2Ds dual core CPUs have 6Mb.
  4. Splat


    Tools such as BCB are good to use if you need to use form input/display. BCB is easy to use because you design the form and write the core processing code behind it. BCB hooks into its own library to display the forms. It works great. The only problem with using Borland tools is they have their own names and class hierarchies.

    If you want to take advantage of newer computer architectures and OS then use newer tools such as Microsoft Visual Studio .Net editions which not only support the new .Net languages but also standard C++ (termed unmanaged code). Again MS use their own names and class hierarchies.

    The Intel compiler is definitely the best to use for optimization/speed for Intel processors. However I dont think you will be able to design any forms with it like you currently do.

    At the end of the day if BCB is working for you go for it and use it especially as you are learning C++ at this stage. .
  5. bespoke


    Thanks for the information. Looks like I'll continue using BCB for the time being. I want the transistion over to be as quick and easy as possible.

    My programs do require a lot of input/display especially when things are in the testing/tweaking phase. So it seems like BCB may be the right choice.
  6. Splat


    One thing to be careful of is that once you develop your 'holy grail system', if it is overly complex or extensive (for instance if your application uses a lot of forms and/or BCB specific classes), you may become trapped into using the compiler you used and it may become too difficult to move over to using say a Microsoft compiler later.

    So you may have to decide what you want to do once you have learnt C++ or if you plan to learn and develop your system now, it may prove better to decide now.
  7. rosy2


    i think the intel compiler was benchmarked as creating fastest code, but gcc has worked for me. Also be realistic. 1000+ executions/day doesnt need c++. Its your code or your network setup that is the bottleneck.
  8. The trades per day is irrelevant IMHO. The most critical performance-related issue is the data feed. Using Level II ? Tracking Multiple Symbols ? Using Complex Algorithmic calculations ?
    If YES, YES, YES, you definitely need C or C++....and multithreading....which is a whole other can of worms to worry about. Then, throw in accomodating the new dual/quad CPU's...and suddenly it gets real complex.
  9. Definetly use C++ (I use VC++) .. I did build a historical analyzer in C# (NET) but at the end rewrote it all in C++. Much..Much faster....

    The larger cache, CPU memory will help you accordingly but much of your "performance" will have to do how optimized/multithreaded you write your code and algorithms.

    Someone mentioned also how fast is your data feed. That is very true also. Get a very fast data feed.
  10. Carl K

    Carl K

    Loops like idling an car, uses resources with little or no return.
    Atempt to replace them with interupts or flags or become creative.

    #10     Feb 23, 2008