Re: timeit module for comparing the performance of two scripts

2006-07-12 Thread Georg Brandl
3c273 wrote: > "John Machin" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> You appear to know what a switch is. I'm therefore surprised that you >> appear not to >> know that the convention is that any program that uses >> command-line switches should do something informative whe

Re: timeit module for comparing the performance of two scripts

2006-07-12 Thread Fredrik Lundh
"3c273" wrote: > Doh! Me thinks Windows at work "python /?" (No good!) that was supposed to be fixed in 2.5, but it doesn't seem to have made it into beta 2. hmm. -- http://mail.python.org/mailman/listinfo/python-list

Re: timeit module for comparing the performance of two scripts

2006-07-11 Thread 3c273
"John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You appear to know what a switch is. I'm therefore surprised that you > appear not to > know that the convention is that any program that uses > command-line switches should do something informative when run with a -h > sw

Re: timeit module for comparing the performance of two scripts

2006-07-11 Thread John Machin
On 12/07/2006 6:35 AM, 3c273 wrote: > "Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> $ python -m timeit -s "import pyConfig" "pyConfig.pyConfig()" >> $ python -m timeit -s "import pyConparse" "pyConparse.pyConParse()" >> >> note that timeit runs the benchmarked

Re: timeit module for comparing the performance of two scripts

2006-07-11 Thread John Machin
On 12/07/2006 1:33 AM, Phoe6 wrote: > Hi, Hi, I'm a little astonished that anyone would worry too much (if at all!) about how long it took to read a config file. Generally, one would concentrate on correctness, and legibility of source code. There's not much point IMHO in timing your pyConfig

Re: timeit module for comparing the performance of two scripts

2006-07-11 Thread 3c273
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > $ python -m timeit -s "import pyConfig" "pyConfig.pyConfig()" > $ python -m timeit -s "import pyConparse" "pyConparse.pyConParse()" > > note that timeit runs the benchmarked function multiple times, so you may want > to

Re: timeit module for comparing the performance of two scripts

2006-07-11 Thread Fredrik Lundh
"Phoe6" >> $ python -m timeit -s "import pyConfig" "pyConfig.pyConfig()" >> $ python -m timeit -s "import pyConparse" "pyConparse.pyConParse()" > >> note that timeit runs the benchmarked function multiple times, so you may >> want >> to remove the print statements. > > Thanks a lot Fredrik!. I di

Re: timeit module for comparing the performance of two scripts

2006-07-11 Thread Phoe6
Fredrik Lundh wrote: > > $ python -m timeit -s "import pyConfig" "pyConfig.pyConfig()" > $ python -m timeit -s "import pyConparse" "pyConparse.pyConParse()" > note that timeit runs the benchmarked function multiple times, so you may want > to remove the print statements. Thanks a lot Fredrik!. I

Re: timeit module for comparing the performance of two scripts

2006-07-11 Thread Fredrik Lundh
"Phoe6" <[EMAIL PROTECTED]> wrote: > How do I compare the performance of pyConfig.py vs pyConparse.py using > timeit module? $ python -m timeit -s "import pyConfig" "pyConfig.pyConfig()" $ python -m timeit -s "import pyConparse" "pyConparse.pyConParse()" note that timeit runs the benchmarked fun