On Wed, Feb 3, 2010 at 9:11 PM, Stefan Behnel <[email protected]> wrote: > > Dag Sverre Seljebotn, 03.02.2010 12:20: >> We should have an option to split Cython-generated code into reusable >> include-files at some point too, and perhaps make use of precompiled >> headers. > > Given that the largest part of code in a Cython generated C file is due to > real user code, I doubt that there is much Cython can improve by spitting > out multiple files here.
I don't think that's always true. Cython quickly generates files which are about 1 Mb of content. For relatively simple code (with a couple of python-visible functions), generated files are 5000 LOC, whereas a hand-made file would be much smaller. I checked on one simple cython file in my talkbox scikits, and the actual code is < 1/3 of the generated C code. It would be interesting to try this with test cases, but there is definitely things in the way cython generates code that makes compilation very slow. > For most projects where build time actually matters, I bet there's a lot > more to gain from getting distutils to build multiple modules in parallel, > than from reducing the amount of code that is built in each step. Actually, doing so in practice for python extensions is quite difficult because of the lack of C awareness of symbols sharing (how to access symbols between object files without polluting the resulting shared library). It took me maybe one full week of work to be able to do that in NumPy, to a point where Compile/Test/Debug cycles are a couple of seconds instead of ~ 1 minute. David _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
