David Cournapeau wrote: > I understand parsing in slow in general; I was wondering why parsing > pxd is.
Are you sure that it is? Do you have timings indicating that parsing 1000 lines of enum declarations is significantly slower than parsing 1000 lines of any other kind of Cython code? > Now, "it > is slow because nobody bothered speeding it up" is a totally vaild > answer :) Another valid answer is might be "there is no particular bottleneck causing this problem that can be optimized". > I don't understand why only cython can know about it; many build tools > handle dependencies without the compiler's help If you're willing to manually declare all the dependencies in your Makefile or whatever, that's okay. > I don't have .dep files, but then, I don't > use distutils either, so that may explain it. You won't get .dep files from using distutils -- you need to invoke the compiler from the command line with appropriate options, or call it from a Python script. If you do it the right way, then a given .pxd file will only be parsed once for each compilation rather than once for each .pyx file that imports it, which can speed up the compilation process considerably. The relevant section of the Pyrex docs is here: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/version/Doc/Manual/source_files.html#mozTocId233830 -- Greg _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
