On May 7, 2009, at 20:42 , Lisandro Dalcin wrote:

Brian, in the Cython version, class Neuron, do this: instead of "def
update(...)", please write "cpdef update(...)" and time your code
again. If this make it faster (it should be near the C-struct
version), please consider first removing your original "def update",
and replace your "cdef _update()" by "cpdef update()".


thanks, but this didn't change the time much at all (something like . 5 ms out of 20ms). I was following the example in the cython docs Early Binding for Speed section, but now I see it got updated to cpdef!

I'll keep hacking away at it. Perhaps I'll try a smaller example, to see the difference between lookups in classes and in structs, if that really is the issue.

Is there a better way to find speed bottlenecks than the "comment out and re-compile" method? :)

                thanks,

                        bb

--
Brian Blais
[email protected]
http://web.bryant.edu/~bblais

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to