Conversation
|
There is only one difference of behavior between cythonized and pure python version of library (as long as I know) - and this is causing the only one unittest failing: cythonized version of library due translating python function to C function is not raising Lines 141 to 144 in ed75968 In cython it is tranlated to: But this should not happen when broker is correctly implemented - but in any case cythonized version should not be used with nonstandard/experimental brokers. |
|
Here is cythonization report of serialization.py: Here you can see which lines (less yellow, more pure C used) uses pure C (these yields biggest speed improvement). But this can be improved more when we will convert and statically type Line 37 in 7878f1d but as I have said needs more changes in library. |
auvipy
left a comment
There was a problem hiding this comment.
the approach and codes look less redical than rust version.
|
I still think we should avoid C extensions and unsafe code. |
|
then we could try this in another fork. celery should be python3 only |
|
I don't think you understand what I mean. |
|
Also aiohttp is using cython - see: |
|
Closed in favor of #311 |
This PR is an alternative to #258.
It consists of 3 parts:
__slots__in GenericContent, since should be more lightweight than regular classThe advantage of this approach is to have one single code base which is already well tested and tuned by users. The disadvantage is that not everything can be converted to "pure" C.
What is pending:
[1] https://bugs.python.org/issue26110
[2] https://docs.python.org/3.7/whatsnew/3.7.html#cpython-bytecode-changes