[please avoid top-posting]

Arthur de Souza Ribeiro, 15.04.2011 04:31:
I've created the .pyx files and it passed in all python tests.

Fine.

As far as I can see, you only added static types in some places. Did you test if they are actually required (maybe using "cython -a")? Some of them look rather counterproductive and should lead to a major slow-down. I added comments to your initial commit.

Note that it's not obvious from your initial commit what you actually changed. It would have been better to import the original file first, rename it to .pyx, and then commit your changes.

It appears that you accidentally added your .c and .so files to your repo.

https://github.com/arthursribeiro/JSON-module


To test them, as I said, I copied the .py test files to my project
directory, generated the .so files, import them instead of python modules
and run. I run every test file and it passed in all of them. To run the
tests, run the file 'run-tests.sh'

I used just .pyx in this module, should I reimplement it using pxd with the
normal .py?

Not at this point. I think it's more important to get some performance numbers to see how your module behaves compared to the C accelerator module (_json.c). I think the best approach to this project would actually be to start with profiling the Python implementation to see where performance problems occur (or to look through _json.c to see what the CPython developers considered performance critical), and then put the focus on trying to speed up only those parts of the Python implementation, by adding static types and potentially even rewriting them in a way that Cython can optimise them better.

Stefan
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to