Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cython optimizations #20

Open
syegulalp opened this issue Apr 18, 2016 · 5 comments
Open

Cython optimizations #20

syegulalp opened this issue Apr 18, 2016 · 5 comments

Comments

@syegulalp
Copy link

I was working on ways to speed up earlier versions of this project by way of Cython. When things stabilize a bit, I'll see about contributing some code in that vein, but if you don't want Cython to be a requirement, I can make it into a separately maintained fork.

@traverseda
Copy link
Owner

traverseda commented Apr 18, 2016

How do you feel about CFFI? I'd prefer pypy compatibility for the server side, if it's reasonable to do that.

I haven't really worked with either.

@syegulalp
Copy link
Author

syegulalp commented Apr 18, 2016

The advantage of Cython is that it would allow us to selectively speed up hotspots in the code with relatively little work, by compiling those modules to C. CFFI is more about talking to existing C code. I don't think using Cython would preclude PyPy compatibility, though, but I'd have to check.

@traverseda
Copy link
Owner

Well I'm not going to get in the way of any pull requests. I don't think there's any compelling reason to keep it in a separate fork.

@syegulalp
Copy link
Author

Sure thing. I mention it only because it means the modules in question have to be essentially rewritten in Cython (it's a variant of Python with type hinting and some other changes), but we can try it out little by little and see how disruptive it is. Just compiling the code as-is yields only about a 15-20% improvement in performance; the really big gains require some rewriting.

It might also be possible to use the Cythonized version of a module if Cython is present in this particular installation, or fall back to the more general one if it's not.

@mrpudn
Copy link
Contributor

mrpudn commented Apr 18, 2016

I'm onboard for Cython - after things stabilize, of course. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants