Re: [Python-Dev] Disabling cyclic GC in timeit module

2011-10-18 Thread John Arbash Meinel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ... >> If you are only measuring json encoding of a few select pieces of >> data then it's a microbenchmark. If you are measuring the whole >> application (or a significant part of it) then I'm not sure >> timeit is the right tool for that. >> >> Reg

Re: [Python-Dev] Disabling cyclic GC in timeit module

2011-10-07 Thread Eli Bendersky
> Perhaps timeit should grow a macro-benchmark tool too? I find myself often > using timeit to time macro-benchmarks simply because it's more convenient at > the interactive interpreter than the alternatives. > > Something like this idea perhaps? > > http://preshing.com/20110924/timing-your-code-us

Re: [Python-Dev] Disabling cyclic GC in timeit module

2011-10-07 Thread Steven D'Aprano
Antoine Pitrou wrote: In CPython, looking for reference cycles is a parasitic task that interferes with what you are trying to measure. It is not critical in any way, and you can schedule it much less often if it takes too much CPU, without any really adverse consequences. timeit takes the safe w

Re: [Python-Dev] Disabling cyclic GC in timeit module

2011-10-07 Thread Maciej Fijalkowski
On Sat, Oct 8, 2011 at 2:18 AM, Antoine Pitrou wrote: > >> > >> > In CPython, looking for reference cycles is a parasitic task that >> > interferes with what you are trying to measure. It is not critical in >> > any way, and you can schedule it much less often if it takes too much >> > CPU, withou

Re: [Python-Dev] Disabling cyclic GC in timeit module

2011-10-07 Thread Antoine Pitrou
> > > > In CPython, looking for reference cycles is a parasitic task that > > interferes with what you are trying to measure. It is not critical in > > any way, and you can schedule it much less often if it takes too much > > CPU, without any really adverse consequences. timeit takes the safe way

Re: [Python-Dev] Disabling cyclic GC in timeit module

2011-10-07 Thread Maciej Fijalkowski
On Sat, Oct 8, 2011 at 1:47 AM, Antoine Pitrou wrote: > On Sat, 8 Oct 2011 00:13:40 +0200 > Maciej Fijalkowski wrote: >> On Fri, Oct 7, 2011 at 11:47 PM, Nick Coghlan wrote: >> > On Fri, Oct 7, 2011 at 4:50 PM, Maciej Fijalkowski >> > wrote: >> >> Hi >> >> >> >> Can we disable by default disab

Re: [Python-Dev] Disabling cyclic GC in timeit module

2011-10-07 Thread Antoine Pitrou
On Sat, 8 Oct 2011 00:13:40 +0200 Maciej Fijalkowski wrote: > On Fri, Oct 7, 2011 at 11:47 PM, Nick Coghlan wrote: > > On Fri, Oct 7, 2011 at 4:50 PM, Maciej Fijalkowski wrote: > >> Hi > >> > >> Can we disable by default disabling the cyclic gc in timeit module? > >> Often posts on pypy-dev or o

Re: [Python-Dev] Disabling cyclic GC in timeit module

2011-10-07 Thread Maciej Fijalkowski
On Fri, Oct 7, 2011 at 11:47 PM, Nick Coghlan wrote: > On Fri, Oct 7, 2011 at 4:50 PM, Maciej Fijalkowski wrote: >> Hi >> >> Can we disable by default disabling the cyclic gc in timeit module? >> Often posts on pypy-dev or on pypy bugs contain usage of timeit module >> which might change the perf

Re: [Python-Dev] Disabling cyclic GC in timeit module

2011-10-07 Thread Nick Coghlan
On Fri, Oct 7, 2011 at 4:50 PM, Maciej Fijalkowski wrote: > Hi > > Can we disable by default disabling the cyclic gc in timeit module? > Often posts on pypy-dev or on pypy bugs contain usage of timeit module > which might change the performance significantly. A good example is > json benchmarks -