[Cython] memoryviews bloat?

Robert Bradshaw robertwb at gmail.com
Tue Sep 10 02:14:11 CEST 2013


>> 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. This means that there's likely a lot of
low-hanging fruit for those who find the compile time too slow (do you
have some specific stats?). Also, while Cython generates very verbose
C code, much of it is optimized away. While the lines-of-code and
compile times are related, they should not be conflated.

The recently added common_utility_include_dir option to cythonize(...)
might help as well--it allows utility code to be shared across
multiple generated files.

Perhaps a faster -c dbg option for development would be handy.

- Robert


More information about the cython-devel mailing list