[issue37158] Speed-up statistics.fmean()

2019-06-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I can close it now :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37158] Speed-up statistics.fmean()

2019-06-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: 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.) -- ___

[issue37158] Speed-up statistics.fmean()

2019-06-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 9ddb77741e041966d64739353393bcba33cc3bdd 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/9ddb77741e041966d64739353

[issue37158] Speed-up statistics.fmean()

2019-06-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 6c01ebcc0dfc6be22950fabb46bdc10dcb6202c9 by Raymond Hettinger in branch 'master': bpo-37158: Simplify and speed-up statistics.fmean() (GH-13832) https://github.com/python/cpython/commit/6c01ebcc0dfc6be22950fabb46bdc10dcb6202c9 -- _

[issue37158] Speed-up statistics.fmean()

2019-06-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +13720 pull_request: https://github.com/python/cpython/pull/13843 ___ Python tracker ___ __

[issue37158] Speed-up statistics.fmean()

2019-06-04 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +13711 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13832 ___ Python tracker __

[issue37158] Speed-up statistics.fmean()

2019-06-04 Thread Raymond Hettinger
New submission from Raymond Hettinger : 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(