pycrypto should stop poking inside long objects

Bug #1131452 reported by fijal
56
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Python-Crypto
New
Undecided
Unassigned

Bug Description

As per https://bugs.pypy.org/issue997 pycrypto should stop poking inside long objects and use the C API. Alternatively, pycrypto should not compile _fastmath.c when run on top of pypy and just use the fallback.

Revision history for this message
Legrandin (gooksankoo) wrote :

I have just opened a pull request here:

https://github.com/dlitz/pycrypto/pull/59

_fastmath does not not access internals of PyLongs anymore.

Once I got the whole library running though, it was interesting to see that PyCrypto becomes significantly slower in PyPy by a factor of ~30%, and that does not seem related to the code I changed.

BTW, not compiling _fastmath would make public key operation unbearably slow.

Revision history for this message
Tobias Oberstein (tobias-oberstein) wrote :

For the record: pycrypto is an (optional) Twisted depdendency, and accelerated _fastmath is clearly desirable.

The issue is still there, PyPy 2.2 can't use PyCrypto due to this, and @gooksankoo: PyPy's performance with cpyext stuff has significantly improved (with 2.2 release).

However, for PyPy, the best thing would be to port this to cffi. This works on CPy and PyPy with high-performance, and one does not loose sanity when programming (as with CPy C API). Anyway.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.