Re: How to make python run faster

2008-04-14 Thread Gabriel Genellina
En Mon, 14 Apr 2008 10:48:47 -0300, 一首诗 <[EMAIL PROTECTED]> escribió: > I read this article on http://kortis.to/radix/python_ext/ Note the date (2002) and the Python version used (2.1) > And I decided to try if it's true. > > I write the program in 4 ways: > > 1. Pure C > 2. Python using C exten

Re: How to make python run faster

2008-04-14 Thread king kikapu
On 14 Απρ, 16:48, 一首诗 <[EMAIL PROTECTED]> wrote: > I read this article onhttp://kortis.to/radix/python_ext/ > > And I decided to try if it's true. > > I write the program in 4 ways: > > 1. Pure C > 2. Python using C extension > 3. Python using psycho > 4. Pure Python > > And then I used timeit to t

Re: How to make python run faster

2008-04-14 Thread J Sisson
2008/4/14 <[EMAIL PROTECTED]>: > On Apr 14, 8:48 am, 一首诗 <[EMAIL PROTECTED]> wrote: > > > But, it is still not as fast as 1. > > > So if speed is the #1 design goal, use pure C. If not, develop in > pure Python and, if the application is too slow, profile the code and > look for bottlenecks that

Re: How to make python run faster

2008-04-14 Thread lbonafide
On Apr 14, 8:48 am, 一首诗 <[EMAIL PROTECTED]> wrote: > But, it is still not as fast as 1. So if speed is the #1 design goal, use pure C. If not, develop in pure Python and, if the application is too slow, profile the code and look for bottlenecks that can be optimized. There's a good chance that

How to make python run faster

2008-04-14 Thread 一首诗
I read this article on http://kortis.to/radix/python_ext/ And I decided to try if it's true. I write the program in 4 ways: 1. Pure C 2. Python using C extension 3. Python using psycho 4. Pure Python And then I used timeit to test the speed of these 4. Unsurprisingly, the time they cost were: