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. Regards

[Python-Dev] Disabling cyclic GC in timeit module

2011-10-07 Thread Maciej Fijalkowski
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 - you would rather not disable cyclic GC when running a web app, so

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 fij...@gmail.com 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

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 ncogh...@gmail.com wrote: On Fri, Oct 7, 2011 at 4:50 PM, Maciej Fijalkowski fij...@gmail.com 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

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 fij...@gmail.com wrote: On Fri, Oct 7, 2011 at 11:47 PM, Nick Coghlan ncogh...@gmail.com wrote: On Fri, Oct 7, 2011 at 4:50 PM, Maciej Fijalkowski fij...@gmail.com wrote: Hi Can we disable by default disabling the cyclic gc in timeit

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 solip...@pitrou.net wrote: On Sat, 8 Oct 2011 00:13:40 +0200 Maciej Fijalkowski fij...@gmail.com wrote: On Fri, Oct 7, 2011 at 11:47 PM, Nick Coghlan ncogh...@gmail.com wrote: On Fri, Oct 7, 2011 at 4:50 PM, Maciej Fijalkowski fij...@gmail.com

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 and

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 solip...@pitrou.net 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,

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

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?