Re: Writing code to be optimizable

2011-11-23 Thread Roy Smith
In article <63e78437-c76b-4a9e-9a62-bfea8d078...@v5g2000yqn.googlegroups.com>, snorble wrote: > Is it reasonable to prototype an application in Python that will > require performance? Yes. Several observations: 1) The classic 80/20 rule. 80% of the time is spent running 20% of the code. S

Re: Writing code to be optimizable

2011-11-22 Thread Stefan Behnel
snorble, 23.11.2011 06:19: Sometimes I want to prototype a program in Python, with the idea of optimizing it later by rewriting parts of it in C or Cython. But I usually find that in order to rewrite the slow parts, I end up writing those parts very much like C or C++ anyway, and I end up wonderi

Re: Writing code to be optimizable

2011-11-22 Thread Chris Angelico
On Wed, Nov 23, 2011 at 4:19 PM, snorble wrote: > Sometimes I want to prototype a program in Python, with the idea of > optimizing it later by rewriting parts of it in C or Cython. But I > usually find that in order to rewrite the slow parts, I end up writing > those parts very much like C or C++

Writing code to be optimizable

2011-11-22 Thread snorble
Sometimes I want to prototype a program in Python, with the idea of optimizing it later by rewriting parts of it in C or Cython. But I usually find that in order to rewrite the slow parts, I end up writing those parts very much like C or C++ anyway, and I end up wondering what is the point of using