Python versus C++ Speed

Discussion in 'Trading Software' started by nononsense, Jan 29, 2006.

  1. What do you mean by speed?

    Choice of language is dictated by the relative cost of execution time versus development & maintainence time.

    If you're writing code used by millions of people, or if a microsecond can cost you thousands of dollars, by all means write C code.

    If you're like me and you write code for your own use, and you spend a lot more time writing your code than you spend running it, Python so much faster than C it's not even funny.

    It all depends.

    Martin
     
    #11     Jan 30, 2006
  2. Python so much faster than C it's not even funny
    Who said this?
    Ya didn't look at the reference cited:
    http://amath.colorado.edu/faculty/fperez/talks/0204_python-c.pdf
    Come back after you did and know what you're talking about.
     
    #12     Jan 30, 2006
  3. matplotlib is a good free plotting package for simple 2D graphics......
     
    #13     Jan 30, 2006
  4. #14     Jan 30, 2006
  5. I might say quite "simple" in interface and vast in implementation... Remember that matplotlib is a front-end to a large variety of back-ends as nonon was suggesting. This includes complete gui libraries also vector graphics (cairo, etc.) and imaging capabilities, not to mention it inherits the matlab like package "Scipy" (More correctly it's Numpy, the new replacement of Numeric and Numarray ) for mathematical / Nd array functionality.

    screenshots
     
    #15     Jan 30, 2006
  6. While I'm thinking about it, what's recommended for 2d plotting and/or gui libs through a straight "C" API?
     
    #16     Jan 30, 2006
  7. Well yes ..... but if your visualization needs are demanding you will spend a lot of time and effort with these - it might make sense depending upon circumstances - whereas other specialized tools might be able to handle things in one line of code.....

    Again, in general I will use these if I can .... certainly if I had extremely demanding visualization needs then I might turn to these as a portion of a custom solution .... but for moderately demaning applications I might even use a tool which requires a fee .....
     
    #17     Jan 30, 2006
  8. If you need more as 3D, you can use gnuplot - (gplt in scipy).
    Further there is MayaVi py-based (uses VTK). Hard to imagine anything "demanding" that couldn't be handled by these. You can see some examples in the url posted earlier.
     
    #18     Jan 30, 2006
  9. Yes, I read it, it is a competent overview.

    You, however, did not even read my post.

    Read again. Read for comprehension, not just looking for something to disagree with. Then tell me whether you still think I'm wrong and why, and we can have a discussion.

    Martin
     
    #19     Jan 30, 2006
  10. Sorry if I misread you Martin.
    For an ordinary guy like me, you could have said it in a more straightforward way. Your "and you spend a lot more time writing your code than you spend running it" kind of threw me of and I'm still not sure what it means in this context.
     
    #20     Jan 30, 2006