Python’s Weak Performance Matters
metarabbit.wordpress.com
Python’s Weak Performance Matters
1–10 of 336 posts
Re: Python’s Weak Performance Matters
#2This strikes me as an odd conclusion to come to if speed was the main motivator.
Re: Python’s Weak Performance Matters
#3I love writing in Python but would not use it for something where performance matters.
Re: Python’s Weak Performance Matters
#4> The result is that I find myself doing more and more things in Haskell, which lets me write high-level code with decent performance (still slower than what I get if I go all the way down to C++, but with very good libraries). This strikes me as an odd conclusion to come to if speed was the main motivator.
Re: Python’s Weak Performance Matters
#5But I think the best part is in programmer time. An anecdote I find endlessly entertaining is on another forum I shared some code to solve a problem people were having an issue with, and it was assumed my code was pseudo-code. It was correct, compilable C#. And they're constantly adding incredibly useful features. For instance a recent addition is more expressive tuples:
(int number, string s, char c) triple = (2, "two", '2');
triple.number = 13;
And lambda functionality is similarly clean. A lambda value might be: x => 2*x + 5;
Equivalently, as an anonymous method: delegate(double x){return 2*x + 5;}
And an example of how simple arbitrary processor count parallel programming can be (using lambda syntax as above): Parallel.ForEach(listOfThings, thing => DoSomething(thing));
Yet as typical in scenarios like this one, the author sees the decision as being between opposite extremes of C++ and Python. The only downsides of the language I've run into are a lack of some shoot yourself in the foot features of C++, like multiple inheritance, and the fact that template specialization is awkward. Garbage collection is vastly overblown. My main work is with projects that have in memory collections in the gigs of size and you'd think the collector would be a huge issue, yet it's mostly transparent and can be controlled if necessary - which in the vast majority of cases, is not.Re: Python’s Weak Performance Matters
#6> The result is that I find myself doing more and more things in Haskell, which lets me write high-level code with decent performance (still slower than what I get if I go all the way down to C++, but with very good libraries). This strikes me as an odd conclusion to come to if speed was the main motivator.
Re: Python’s Weak Performance Matters
#7Re: Python’s Weak Performance Matters
#8> The result is that I find myself doing more and more things in Haskell, which lets me write high-level code with decent performance (still slower than what I get if I go all the way down to C++, but with very good libraries). This strikes me as an odd conclusion to come to if speed was the main motivator.
Re: Python’s Weak Performance Matters
#9> The result is that I find myself doing more and more things in Haskell, which lets me write high-level code with decent performance (still slower than what I get if I go all the way down to C++, but with very good libraries). This strikes me as an odd conclusion to come to if speed was the main motivator.
C++ would probably increases his development time significantly compared to Haskell.
Re: Python’s Weak Performance Matters
#10Also, I’ve more than once seen cpython beat C++/Fortran since it’s easier to do the right algo/datastructure things, plus numpy is more optimized than most «amateur» C loop-over-arrays.
That being said, faster python is always welcome.