GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — gh-142863: optimize list and set calls with generator expressions by kumaraditya303 · Pull Request #142864 · python/cpython Conversation
|
|
Benchmark results: Before: ❯ ./python.exe -m timeit "list(x for x in range(10000))" 2000 loops, best of 5: 188 usec per loop ❯ ./python.exe -m timeit "set(x for x in range(10000))" 1000 loops, best of 5: 226 usec per loop After: ❯ ./python.exe -m timeit "list(x for x in range(10000))" 2000 loops, best of 5: 150 usec per loop ❯ ./python.exe -m timeit "set(x for x in range(10000))" 2000 loops, best of 5: 178 usec per loop |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This looks promising. @kumaraditya303 can you benchmark this with small sequences, as those tend to more common. @iritkatriel could you take a look, as author of the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Benchmark with smaller sequence: ❯ ./python.exe -m timeit "list(x for x in range(25))" 500000 loops, best of 5: 483 nsec per loop After: ❯ ./python.exe -m timeit "list(x for x in range(25))" 500000 loops, best of 5: 390 nsec per loop |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@markshannon I have fixed the merge conflicts, can you review this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.