FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-114682: Improve performance of module state access in `_decimal` by neonene · Pull Request #115401 · python/cpython · GitHub

/ cpython Public

gh-114682: Improve performance of module state access in _decimal - #115401

Closed
neonene wants to merge 3 commits into
python:mainfrom
neonene:mstate
Closed

gh-114682: Improve performance of module state access in _decimal#115401
neonene wants to merge 3 commits into
python:mainfrom
neonene:mstate

Conversation

neonene commented Feb 13, 2024
edited
Loading

Copy link
Copy Markdown
Contributor
  • Fix the module state access in ieee_context().
  • Optimize get_module_state_by_def(), which *_richcompare() now switch to.
  • Optimize find_state_left_or_right().
  • Make Context objects carry decimal_state.

neonene commented Feb 17, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

Around 18% recovery with na+8 and da+32 in the pi test for me, which is no slower than the global state access. About 14% with 8+na and 32+da. FYI,

  • Carrying a module state by the Decimal object seems not to be faster even if dec_richcompare() is boosted.

  • SignalDictMixin type has non-NULL ht_module, unlike SignalDict subtype. get_module_state_by_def(tp_base) or _PyType_GetModuleState(tp_base) can be used in signaldict_*().

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL