Python Forum
performance time - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: performance time (/thread-17377.html)



performance time - Skaperen - Apr-09-2019

back in the day when computers were slower and were often programmed in assembly, much concern was given to choice of code to achieve a lower number of cycles. these days, especially with architecture diversity, we focus more on good algorithms and development time. i have been wonder about the push away from good algorithms to purely development time. i wonder if Python has any effect, one way or the other, on the development time/cost of choosing good algorithms. of course, if you had 2 implementations of foo() to choose from, you would choose O(log(n)) over O(n*n). but what you had the same kind of choice of 2 implementations of bar() and it was going to be time consuming to discover their performance. knowing usage patterns will be a factor in making the decision. and that may even be a guess. what if sales keeps pushing on delivery time? can Python help in these kinds of issues these days?


RE: performance time - perfringo - Apr-09-2019

Quote:“The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming.” --Donald Knuth, The Art of Computer Programming

BDFL was heavily influenced by Knuth and therefore Python's Design Philosophy includes among other things:

Quote:- Don’t fret too much about performance--plan to optimize later when needed.
- Don’t try for perfection because “good enough” is often just that.
....
Rather than striving for perfection, early adopters found that Python worked "well enough" for their purposes. As the user-base grew, suggestions for improvement were gradually incorporated into the language. As we will seen in later sections, many of these improvements have involved substantial changes and reworking of core parts of the language.



RE: performance time - Skaperen - Apr-13-2019

too often "good enough", to sales, means gross sales revenue. i a way, Python helps. first to market can mean great sales. but what if the competitor has a much higher performance? hopefully, going back and switching to better algorithms is what's needed. but maybe all new stuff needs to be analyzed. can algorithm analysis be done in Python?