C++ Compilers.

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

  1. Not sure if this is information you already know but vc has alot of compiler options (which I dont know much about) for performance.

    Also in the subject of making things go faster you may want to educate yourself on the different calling conventions there are and possibly use inline functions in some places. Calling functions can be done different ways and if its a deeply nesteled function shaving a few cycles off could make a big difference.
     
    #11     Feb 23, 2008
  2. Just wondering, how would you repalce a loop to calc a simple avg (not exponential) in a double series ?
     
    #12     Feb 23, 2008
  3. bespoke

    bespoke

    Yes, 1000+ executions per day doesn't require C. I should have been more clear. I monitor every tick, every quote change, etc and keep a log of it all for analysis for a couple hundred symbols and I'd like to increase that number if my program permits it. During high volume times, it is probably my data feed but it could also be my software. I can see the difference in what my program believes is the current price, and what my platform says is the current price, sometimes over a minute late! So I'm not sure if its API feed or if my program can't keep up.

    But during times of normal volume, I find my program struggling to keep up at times, and its typically later on in the day when more data has been accumulated. And sometimes I have to shut it down cause I can't afford to enter/exit trades 10 seconds too late.

    I'm not a programmer. I just a guy who can program at best at an average level as I've been doing it on/off for the past 15 or so years. I'm a newbie compared to you guys, and I've only been working on real-time automation for about 8 months.

    I'm also working on an older computer now that I've recently left my office (AMD 64 3000+). Definitely time for an upgrade.

    I just don't want to waste anymore time with VB if it's going to limit what I can do.

    Thanks for the help.
     
    #13     Feb 23, 2008
  4. rosy2

    rosy2

    the fact that its later in the day tells me that you are recomputing stuff.

    you're probably better than 85% of people who call themselves programmers.

    it wont hurt to go c++ but the people who always say you need to write in c++ for high frequency dont work in the industry.
     
    #14     Feb 23, 2008
  5. Carl K

    Carl K

    The Loops I ment are like Stop Lights for cars (waiting) for input/output, etc.

    Carl
     
    #15     Feb 23, 2008
  6. This sounds like you might have a memory leak(s).

    Check your programs virtual memory usage in task manager to see if it makes sence and does not go up to unrealistic amounts.
     
    #16     Feb 23, 2008
  7. Craig66

    Craig66

    You could consider c#, remember that unless your doing a lot of calculations that by far the biggest performance bottle neck will be your I/O with the broker.

    I find the Borland compiler awful, the IDE is atrocious.
     
    #17     Feb 23, 2008
  8. bespoke

    bespoke

    Thanks, I'll look for that on Monday.

    Anyways, I'm going to do a lot of studying. I know my current programming knowledge is going to hold me back in the future. Better to learn now than later. Things were much simpler in the days of QBASIC :D
     
    #18     Feb 23, 2008
  9. bespoke

    bespoke

    At first I wasn't sure if it was even necessary to go to C++. I've read that with computers and Windows these days VB won't be slower than C++ in contrast to the past. I rewrote my historical backtester in BCB and didn't find much of a difference at all (though that is probably my inability to write good code in C!). And I was reading a thread on www.wilmott.com (quant forum) where someone tested VB, C++, and C# against each other using quicksorts (I think) and found VB to actually be the quickest to everyones surprise. And since the only demanding thing in my program is the calculations I figured I might as well continue using VB since I had already done so much already.
     
    #19     Feb 23, 2008
  10. It is difficult to learn how to program well on your own. You can find the basics anywhere but finding how to write GOOD code is hard. Any documentation that I can find on debugging memory leaks is lacking and documentation on how to multithread properly is virtually non-existant. (apparantly even the experts dont know what to do http://www.youtube.com/watch?v=mrvAqvtWYb4 )
     
    #20     Feb 23, 2008