[issue6422] timeit called from within Python should allow autoranging

2019-03-28 Thread Cheryl Sabella
Cheryl Sabella added the comment: The new ticket is #36461. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue6422] timeit called from within Python should allow autoranging

2019-03-28 Thread Cheryl Sabella
Cheryl Sabella added the comment: Steven, Thank you. Yes, I was thinking the same thing. But it might be better at this point for that change to have its own ticket, so I'll open a new issue for it. -- ___ Python tracker

[issue6422] timeit called from within Python should allow autoranging

2019-03-27 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Were you working on the additional functionality that you mentioned in > msg272704 or would that be open for someone else to do? Thanks! Please consider it open. I don't expect it to be difficult, it's just finding the Round Tuits. Perhaps an easy first

[issue6422] timeit called from within Python should allow autoranging

2019-03-27 Thread Cheryl Sabella
Cheryl Sabella added the comment: Hello Steven, Were you working on the additional functionality that you mentioned in msg272704 or would that be open for someone else to do? Thanks! -- nosy: +cheryl.sabella ___ Python tracker

[issue6422] timeit called from within Python should allow autoranging

2016-08-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: Still to do (coming soon): - make the 0.2s time configurable; - have `timeit` and `repeat` methods (and functions) fall back on `autorange` if the number is set to 0 or None. -- assignee: -> steven.daprano ___

[issue6422] timeit called from within Python should allow autoranging

2016-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 424eb46f7f3a by Steven D'Aprano in branch 'default': Issue6422 add autorange method to timeit.Timer https://hg.python.org/cpython/rev/424eb46f7f3a -- nosy: +python-dev ___ Python tracker

[issue6422] timeit called from within Python should allow autoranging

2016-08-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think the patch is good to go. -- ___ Python tracker ___ ___

[issue6422] timeit called from within Python should allow autoranging

2016-08-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: Nick gave a +1 to my auto-range patch with callback on 2016-05-13, and there's been no negative feedback since. Should I go ahead and check it in for 3.6? -- ___ Python tracker

[issue6422] timeit called from within Python should allow autoranging

2016-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: Good point - given that, +1 from me for the callback based version, especially since exception chaining will still disambiguate failures in the callback from other errors. -- ___ Python tracker

[issue6422] timeit called from within Python should allow autoranging

2016-05-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Thu, May 12, 2016 at 04:49:59AM +, Nick Coghlan wrote: > The embedded side-effects were my main concern with Scott's original > patch, so Steven's callback-based approach strikes me as a definite > improvement. However, the awkwardness of the revised

[issue6422] timeit called from within Python should allow autoranging

2016-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: The embedded side-effects were my main concern with Scott's original patch, so Steven's callback-based approach strikes me as a definite improvement. However, the awkwardness of the revised calling code in main does make me wonder whether or not this might be

[issue6422] timeit called from within Python should allow autoranging

2016-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't understand which repeat functionality you're referring to. https://docs.python.org/3/library/timeit.html#timeit.Timer.repeat (or, similarly, what timeit's __main__ does: report the minimum of all N runs) --

[issue6422] timeit called from within Python should allow autoranging

2016-05-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: > I would suggest making the 0.2 tunable as an optional argument. Sounds like a good idea to me. > I also notice the repeat functionality isn't included in the patch, is there > a reason? I don't understand which repeat functionality you're referring to.

[issue6422] timeit called from within Python should allow autoranging

2016-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would suggest making the 0.2 tunable as an optional argument. Different applications (benchmarks) may want different duration / precision tradeoffs. I also notice the repeat functionality isn't included in the patch, is there a reason? --

[issue6422] timeit called from within Python should allow autoranging

2016-05-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: This issue seems to have lost momentum, I'd like to revive it by proposing a slightly different interface for the autorange function. Attached is a proof-of-concept patch. I've moved the code which determines the number of loops out of the main function into

[issue6422] timeit called from within Python should allow autoranging

2015-03-22 Thread Nick Coghlan
Nick Coghlan added the comment: The current patch moves print operations inside timeit() and repeat(), instead of leaving the main() function as the only one with side effects. My counter-proposal was to instead extract the current main functionality out into a side-effect free public API of

[issue6422] timeit called from within Python should allow autoranging

2015-03-17 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- nosy: +rbcollins stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6422 ___

[issue6422] timeit called from within Python should allow autoranging

2015-03-17 Thread Robert Collins
Robert Collins added the comment: I'm confused by the feedback on the patch. It adds a single new function, doesn't alter the public interface for any existing functions, and seems fit for purpose. Could someone help me understand how its deficient? --

[issue6422] timeit called from within Python should allow autoranging

2015-03-17 Thread Robert Collins
Robert Collins added the comment: Filed #23693 for the accuracy thing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6422 ___ ___

[issue6422] timeit called from within Python should allow autoranging

2014-08-06 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: amaury.forgeotdarc - versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6422 ___

[issue6422] timeit called from within Python should allow autoranging

2012-08-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6422 ___ ___ Python-bugs-list

[issue6422] timeit called from within Python should allow autoranging

2012-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: In #5442, I proposed leaving the architecture of the module alone, and simply exposing the main module functionality as a high level helper function: Agreed with Nick's approach above. Victor, if you want to improve timeit's reliability, please open a

[issue6422] timeit called from within Python should allow autoranging

2012-06-27 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Hi, I wrote recently a similar function because timeit is not reliable by default. Results look random and require to run the same benchmark 3 times or more on the command line.

[issue6422] timeit called from within Python should allow autoranging

2012-06-27 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: The calibration function uses also the precision of the timer. Oh, I forgot to mention that it computes the precision in Python, it doesn't read the precision announced by the OS or the precision of the C structure.

[issue6422] timeit called from within Python should allow autoranging

2012-06-26 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: In #5442, I proposed leaving the architecture of the module alone, and simply exposing the main module functionality as a high level helper function: def measure(stmt=pass, setup=pass, timer=default_timer, repeat=default_repeat,

[issue6422] timeit called from within Python should allow autoranging

2012-06-26 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Oops, that link reference should have been to #5441. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6422 ___

[issue6422] timeit called from within Python should allow autoranging

2012-06-26 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- resolution: accepted - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6422 ___ ___ Python-bugs-list

[issue6422] timeit called from within Python should allow autoranging

2012-06-25 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6422 ___ ___ Python-bugs-list

[issue6422] timeit called from within Python should allow autoranging

2012-06-25 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Looking at this again after more time has passes, I still think exposing autoranging is a good idea but I don't like the patch as it stands. It infects the API in a number of places and makes the overall module harder to use

[issue6422] timeit called from within Python should allow autoranging

2010-12-09 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6422 ___

[issue6422] timeit called from within Python should allow autoranging

2010-12-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Not sure why you chose 0.11 here. It should probably be 0.2 as in the command-line code. As for applying the patch, this can't be done before 3.2 is released. -- nosy: +pitrou stage: unit test needed - patch review

[issue6422] timeit called from within Python should allow autoranging

2010-11-30 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This does not conflict with the other proposed changes to timeit and it is in-line with Guido's desire that to expose useful parts currently buried in the command-line logic. Amaury, you've shown an interest. Would you

[issue6422] timeit called from within Python should allow autoranging

2009-07-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: You can still upload available patches to this tracker. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6422

[issue6422] timeit called from within Python should allow autoranging

2009-07-08 Thread Scott David Daniels
Changes by Scott David Daniels scott.dani...@acm.org: -- keywords: +patch Added file: http://bugs.python.org/file14472/timeit.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6422 ___

[issue6422] timeit called from within Python should allow autoranging

2009-07-08 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I would like to look at this in context of all the other proposed build- outs to timeit. -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org

[issue6422] timeit called from within Python should allow autoranging

2009-07-07 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- priority: - normal stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6422 ___

[issue6422] timeit called from within Python should allow autoranging

2009-07-07 Thread Scott David Daniels
Scott David Daniels scott.dani...@acm.org added the comment: I've got the code working on trunk2 for my tests. Should I port to py3K before checking in, and give diffs from there, or what? -- ___ Python tracker rep...@bugs.python.org

[issue6422] timeit called from within Python should allow autoranging

2009-07-05 Thread Scott David Daniels
New submission from Scott David Daniels scott.dani...@acm.org: timeit.main has a _very_ handy autoranging facility to pick an appropriate number of repetitions when not specified. The autoranging code should be lifted to a method on Timer instances (so non-main code can use it). If number is