|
Re: Pyrex method 10x slower than Python, any hints why?: msg#00006python.pyrex
On 2/06/2006 1:39 PM, Andrew Bennetts wrote: > On Fri, Jun 02, 2006 at 01:03:35PM +1000, John Machin wrote: > [...] >>> Perhaps the difference is that Python's eval loop special cases arithmetic >>> operations on numeric types quite heavily, but the same loop in Pyrex has to >>> resort to function calls? >>> >> Huh? AFAICT, all of the operations on numeric types in the quoted code >> are being done in cdef'ed variables i, sum and cost. There is *some* >> overhead caused by converting i to a Python int, and by getting the >> result of the function call (Python float) into cost. > > Sorry, that was a dumb thinko! I was getting muddled with comments elsewhere > that you also tried pyrex without the cdefs. > Futhermore, the OP with the problem is David Chiang, not me. Cheers, John |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Pyrex method 10x slower than Python, any hints why?: 00006, Andrew Bennetts |
|---|---|
| Next by Date: | cdef docstrings: 00006, Eric Huss |
| Previous by Thread: | Re: Pyrex method 10x slower than Python, any hints why?i: 00006, Andrew Bennetts |
| Next by Thread: | cdef docstrings: 00006, Eric Huss |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |