[Cython] memoryviews bloat?

Sturla Molden sturla at molden.no
Tue Sep 10 10:39:17 CEST 2013


Den 10. sep. 2013 kl. 02:14 skrev Robert Bradshaw <robertwb at gmail.com>:

>>> Wow. The first version of this PR used Cython memoryviews, which added a whopping 14 kLOC of generated C to the repo. Switched back to bare pointers to keep the compile times within bounds.
>> It would be interesting to hear the Cython team's point of view on that. @sturlamolden @robertwb @markflorisson88 @dagss
> 
> The priority has always been to produce the most optimized runtime
> code, with compile time being way down on the list of priorities, if
> even thought about at all. 


I thought perhaps the problem was the number of pyx files they had to compile. I.e. that the utility code is included in multiple C files, since they complained about 14 kLOC extra. But to that they answered:


" larsmans commented
a day ago
The problem with typed memoryviews is simply that they're different from what we were doing. We'll have to change a lot of code and habits, being careful not to lose performance due to memoryview overhead."


So I am not sure what the problem really was. Bloat or just an unfamiliar API?

There was also a strange comment about tail-call optimization being prevented in cdef functions that are not declared nogil – due to the refnanny. I am not sure what to make of that.


Sturla










-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20130910/455d06f1/attachment.html>


More information about the cython-devel mailing list