Skip to content

Websocket XOR performance improved. Fixes #686#687

Merged
asvetlov merged 1 commit intoaio-libs:masterfrom
socketpair:fastxor
Dec 18, 2015
Merged

Websocket XOR performance improved. Fixes #686#687
asvetlov merged 1 commit intoaio-libs:masterfrom
socketpair:fastxor

Conversation

@socketpair
Copy link
Contributor

Both cython and pure python-based.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sys.byteorder is little (at least for me), while iirc websocket uses network one which is big. Could anyone confirm this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok. Thanks!

@asvetlov
Copy link
Member

Please report about performance improvement.
I want to mention it in release notes.

Both cython and pure python-based.
@socketpair
Copy link
Contributor Author

@asvetlov

Please report about performance improvement.
In which form ?

I has changed pure-python and cython code. seems both should be faster.

P.S. Also, thaere are no tests that tests xor correctness

@socketpair
Copy link
Contributor Author

@asvetlov I cannot measure performance increase correctly. It varies from 1.2 to 40 for both Python and Cython implementations....

@asvetlov
Copy link
Member

@socketpair Ok.
Thanks.

asvetlov added a commit that referenced this pull request Dec 18, 2015
Weboscket XOR performance improved. Fixes #686
@asvetlov asvetlov merged commit 88d006c into aio-libs:master Dec 18, 2015
@socketpair socketpair changed the title Weboscket XOR performance improved. Fixes #686 Websocket XOR performance improved. Fixes #686 Feb 18, 2016
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants