[issue26002] make statistics.median_grouped more efficient

2016-05-06 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue26002] make statistics.median_grouped more efficient

2016-05-04 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- stage: patch review -> commit review ___ Python tracker ___

[issue26002] make statistics.median_grouped more efficient

2016-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7b2fafd78c1d by Steven D'Aprano in branch 'default': Issue 26002 and 25974 https://hg.python.org/cpython/rev/7b2fafd78c1d -- nosy: +python-dev ___ Python tracker

[issue26002] make statistics.median_grouped more efficient

2016-02-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: Looks good to me. I've run some quick timing tests, and for very small lists, there's no significant difference, but for larger lists I'm getting up to a 50% speedup. Nicely done, thank you. -- ___ Python tracker

[issue26002] make statistics.median_grouped more efficient

2016-01-28 Thread Upendra Kumar
Upendra Kumar added the comment: Yeah, I slightly modified the functions from the bisect docs to suit for the purpose here. -- ___ Python tracker ___

[issue26002] make statistics.median_grouped more efficient

2016-01-28 Thread Upendra Kumar
Upendra Kumar added the comment: Can someone please review my patch? I think it can increase the performance significantly of the median_grouped() function. But, I don't have any standard way of checking if it would improve or will be an overkill for the median_grouped() function?

[issue26002] make statistics.median_grouped more efficient

2016-01-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: This code looks good and will certainly reduce the number of comparisons in non-trivial cases. FWIW, It looks like the index functions are lifted directly from the bisect docs. Steven, any objections? -- nosy: +rhettinger stage: -> patch review

[issue26002] make statistics.median_grouped more efficient

2016-01-03 Thread Upendra Kumar
New submission from Upendra Kumar: statistics.median_grouped currently uses cf=data.index(x) to find the leftmost position of x in data ( line number 445 ). Here, data.index() has linear time complexity, which may not be good for long lists. But, here since the list 'data' is sorted

[issue26002] make statistics.median_grouped more efficient

2016-01-03 Thread SilentGhost
Changes by SilentGhost : -- nosy: +steven.daprano versions: -Python 3.4 ___ Python tracker ___