Websocket XOR performance improved. Fixes #686#687
Websocket XOR performance improved. Fixes #686#687asvetlov merged 1 commit intoaio-libs:masterfrom socketpair:fastxor
Conversation
There was a problem hiding this comment.
sys.byteorder is little (at least for me), while iirc websocket uses network one which is big. Could anyone confirm this?
There was a problem hiding this comment.
in that operation, byte order is irrelevant, since actual numeric value is not used in that code. i.e. byte representation of xored result does not depend on that order.
But, it is a question, which order is optimal to internal bigint logic in python.
|
Please report about performance improvement. |
Both cython and pure python-based.
I has changed pure-python and cython code. seems both should be faster. P.S. Also, thaere are no tests that tests xor correctness |
|
@asvetlov I cannot measure performance increase correctly. It varies from 1.2 to 40 for both Python and Cython implementations.... |
|
@socketpair Ok. |
Weboscket XOR performance improved. Fixes #686
Both cython and pure python-based.