◐ Shell
reader mode source ↗
Skip to content

bpo-30416: Protect the optimizer during constant folding.#4860

Merged
serhiy-storchaka merged 5 commits into
python:masterfrom
serhiy-storchaka:safe-const-folding
Dec 15, 2017
Merged

bpo-30416: Protect the optimizer during constant folding.#4860
serhiy-storchaka merged 5 commits into
python:masterfrom
serhiy-storchaka:safe-const-folding

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Dec 14, 2017

Copy link
Copy Markdown
Member

It no longer spends much time doing complex calculations and no longer consumes much memory for creating large constants that will be dropped later.

This fixes also bpo-21074.

https://bugs.python.org/issue30416

It no longer spends much time doing complex calculations and no
longer consumes much memory for creating large constants that will
be dropped later.

This fixes also bpo-21074.

@methane methane left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

LGTM

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

Thank you @serhiy-storchaka for working on this! A few comments.

@vstinner

Copy link
Copy Markdown
Member

Ok for 1024 items, but why limiting a single tuple to 256? Maybe 1024 should be used for all limits?

@serhiy-storchaka

Copy link
Copy Markdown
Member Author

Oh, it already is increased from 20 to 256. I think this is enough.

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.

5 participants