Skip to content

bpo-38328: Speed up the creation time of constant list literals. #16498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/test/test_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ def get_gen(): yield 1
# list
samples = [[], [1,2,3], ['1', '2', '3']]
for sample in samples:
check(sample, vsize('Pn') + len(sample)*self.P)
check(list(sample), vsize('Pn') + len(sample)*self.P)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a sys.getsizeof test. The 3-element lists are overallocated, so we resize them here.

# sortwrapper (list)
# XXX
# cmpwrapper (list)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sped up the creation time of constant :class:`list` literals. Patch by Brandt Bucher.
283 changes: 142 additions & 141 deletions Python/importlib_external.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading