Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-35696: some minor optimizations on hot path#11473

Closed
ghost wants to merge 2 commits into
masterpython/cpython:masterfrom
unknown repositoryCopy head branch name to clipboard
Closed

bpo-35696: some minor optimizations on hot path#11473
ghost wants to merge 2 commits into
masterpython/cpython:masterfrom
unknown repositoryCopy head branch name to clipboard

Conversation

@ghost

@ghost ghost commented Jan 9, 2019

Copy link
Copy Markdown

in file Objects/longobject.c:

  • in long_compare(), we only need the sign, converting to -1 or +1 is not necessary.
  • when using CHECK_BINOP, check the second argument first, this may save a compare in some cases.

https://bugs.python.org/issue35696

We only need the sign, converting to -1 or +1 is not necessary.
@ghost ghost changed the title bpo-35696: remove unnecessary operation in long_compare() bpo-35696: some minor majorizations on hot path Jan 10, 2019
@ghost ghost changed the title bpo-35696: some minor majorizations on hot path bpo-35696: some minor optimizations on hot path Jan 10, 2019
@ghost

ghost commented Jan 15, 2019

Copy link
Copy Markdown
Author

not prepared yet.

@ghost ghost closed this Jan 15, 2019
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.