On 08/04/2011 11:18, Stefan Behnel wrote:
Maciej Fijalkowski, 08.04.2011 11:41:
On Fri, Apr 8, 2011 at 11:22 AM, Stefan Behnel<stefan...@behnel.de> wrote:
[snip...]
So, once CPython is up and running in the benchmark test, adding Cython
should be as easy as copying the configuration, installing Cython and adding
two lines to site.py.

can you provide a simple command line tool for that? I want
essentially to run ./cython-importing-stuff some-file.py

You can try

    python -c 'import pyximport; \
               pyximport.install(pyimport=True); \
               exec("somefile.py")'

You may want to configure the output directory for the binary modules, though, see

https://github.com/cython/cython/blob/master/pyximport/pyximport.py#L343

Please also take care to provide suitable gcc CFLAGS, e.g. "-O3 -march=native" etc.



If this works it is great. I don't think doing this work should be part of the gsoc proposal. Considering it as a use case could be included in the infrastructure work though.

All the best,

Michael Foord

Obviously, we'd have to integrate a build of the latest Cython development sources as well, but it's not like installing a distutils enabled Python package from sources is so hard that it pushes Cython out of scope for this
GSoC.

no, that's fine. My main concern is - will cython run those
benchmarks?

In the worst case, they will run at CPython speed with uncompiled modules.


and will you complain if we don't provide a custom cython
hacks? (like providing extra type information)

I don't consider providing extra type information a hack. Remember that they are only used for additional speed-ups in cases where the author is smarter than the compiler. It will work just fine without them.

Stefan

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk


--
http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to