[Cython] Utilities, cython.h, libcython
Stefan Behnel
stefan_ml at behnel.de
Fri Oct 7 09:41:34 CEST 2011
Vitja Makarov, 06.10.2011 23:12:
> Here is small comparison on compiling urllib.py with cython:
>
> ((e8527c5...)) vitja at mchome:~/work/cython-vitek-git/zzz$ time python
> ../cython.py urllib.py
>
> real 0m1.699s
> user 0m1.650s
> sys 0m0.040s
> (master) vitja at mchome:~/work/cython-vitek-git/zzz$ time python
> ../cython.py urllib.py
>
> real 0m2.830s
> user 0m2.790s
> sys 0m0.030s
>
>
> It's about 1.5 times slower.
I assume this uses a compiled Cython? That's a pretty serious regression
for plain Python code then. Again, this needs proper profiling.
We may also want to disable certain steps in the pipeline based on the
syntax features used. If a feature is not used that has its own (set of)
visitors, we can disable them completely. Detection already happens based
on the .pyx/.py distinction, but could additionally use a detector (e.g. in
the post-parse phase) that sets up skip flags. One example is the closure
building step, which could be skipped if there are no closures.
Stefan
More information about the cython-devel
mailing list