
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-06-05 05:24 byrhettinger, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 13832 | merged | rhettinger,2019-06-05 05:31 | |
| PR 13843 | merged | miss-islington,2019-06-05 14:40 | |
| Messages (5) | |||
|---|---|---|---|
| msg344670 -(view) | Author: Raymond Hettinger (rhettinger)*![]() | Date: 2019-06-05 05:24 | |
fmean() can be sped-up by converting count() from a function to a generator and by using enumerate() to do the counting.-- Baseline ---$ ./python.exe -m timeit -r11 -s 'from statistics import fmean' -s 'data=list(map(float, range(1000)))' 'fmean(iter(data))'2000 loops, best of 11: 108 usec per loop-- Patched -- $ ./python.exe -m timeit -r11 -s 'from statistics import fmean' -s 'data=list(map(float, range(1000)))' 'fmean(iter(data))'5000 loops, best of 11: 73.1 usec per loop | |||
| msg344726 -(view) | Author: Raymond Hettinger (rhettinger)*![]() | Date: 2019-06-05 14:40 | |
New changeset6c01ebcc0dfc6be22950fabb46bdc10dcb6202c9 by Raymond Hettinger in branch 'master':bpo-37158: Simplify and speed-up statistics.fmean() (GH-13832)https://github.com/python/cpython/commit/6c01ebcc0dfc6be22950fabb46bdc10dcb6202c9 | |||
| msg344733 -(view) | Author: Raymond Hettinger (rhettinger)*![]() | Date: 2019-06-05 15:18 | |
New changeset9ddb77741e041966d64739353393bcba33cc3bdd by Raymond Hettinger (Miss Islington (bot)) in branch '3.8':bpo-37158: Simplify and speed-up statistics.fmean() (GH-13832) (GH-13843)https://github.com/python/cpython/commit/9ddb77741e041966d64739353393bcba33cc3bdd | |||
| msg344746 -(view) | Author: Steven D'Aprano (steven.daprano)*![]() | Date: 2019-06-05 16:45 | |
Nice! On my computer, I get about 30% speed up. Thanks Raymond.The two PRs are status "merged". Does this mean we can close this ticket or is there more to do? (The git workflow is still a mystery to me.) | |||
| msg344747 -(view) | Author: Raymond Hettinger (rhettinger)*![]() | Date: 2019-06-05 16:49 | |
I can close it now :-) | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:16 | admin | set | github: 81339 |
| 2019-06-05 16:49:57 | rhettinger | set | status: open -> closed resolution: fixed messages: +msg344747 stage: patch review -> resolved |
| 2019-06-05 16:45:20 | steven.daprano | set | messages: +msg344746 |
| 2019-06-05 15:18:26 | rhettinger | set | messages: +msg344733 |
| 2019-06-05 14:40:07 | miss-islington | set | pull_requests: +pull_request13720 |
| 2019-06-05 14:40:00 | rhettinger | set | messages: +msg344726 |
| 2019-06-05 05:31:44 | rhettinger | set | keywords: +patch stage: patch review pull_requests: +pull_request13711 |
| 2019-06-05 05:24:04 | rhettinger | create | |