hope this is
ok.
> I want to measure Postgres queries N times, much like Python timeit
> (https://docs.python.org/3/library/timeit.html). I know about
EXPLAIN
> ANALYZE and psql \timing, but there's quite a bit of variation in
the
>
resql than to Python, I hope this is
> ok.
> > I want to measure Postgres queries N times, much like Python timeit
> > (https://docs.python.org/3/library/timeit.html). I know about
> EXPLAIN
> > ANALYZE and psql \timing, but there's qui
On 9/17/2023 11:48 AM, AVI GROSS via Python-list wrote:
Timing things that are fairly simple is hard enough to do repeatedly, but when
it involves access to slower media and especially to network connections to
servers, the number of things that can change are enormous. There are all kinds
of
Python's timeit?
On Sep 15, 2023 19:45, "Peter J. Holzer via Python-list"
wrote:
On 2023-09-15 17:42:06 +0200, Albert-Jan Roskam via Python-list wrote:
>This is more related to Postgresql than to Python, I hope this is
ok.
>I want to measu
times, much like Python timeit
> (https://docs.python.org/3/library/timeit.html). I know about
EXPLAIN
> ANALYZE and psql \timing, but there's quite a bit of variation in
the
> times. Is there a timeit-like function in Postgresql?
Why not simp
On 2023-09-15 17:42:06 +0200, Albert-Jan Roskam via Python-list wrote:
>This is more related to Postgresql than to Python, I hope this is ok.
>I want to measure Postgres queries N times, much like Python timeit
>(https://docs.python.org/3/library/timeit.html). I know abou
Hi,
This is more related to Postgresql than to Python, I hope this is ok.
I want to measure Postgres queries N times, much like Python timeit
(https://docs.python.org/3/library/timeit.html). I know about EXPLAIN
ANALYZE and psql \timing, but there's quite a bit of variation i
On Tue, 19 Dec 2017 02:27 am, ast wrote:
> I discovered that log functions from math module
> works with integers, whatever their size, there is
> no conversion to float.
>
>> import math
>> x = 123456**123456
>> math.log10(x)
> 628577.7303641582 (instantaneous)
>
> so 628578 digits
Nice!
I
"Steve D'Aprano" a écrit dans le message de
news:5a33d0fc$0$2087$b1db1813$d948b...@news.astraweb.com...
On Sat, 16 Dec 2017 12:25 am, ast wrote:
"Thomas Jollans" a écrit dans le message de
news:mailman.74.1513341235.14074.python-l...@python.org...
On 2017-12-15 11:36, ast wrote:
p
**123456; print(time()-t)
> >
> > 0.0
>
> Same here.
>
> > There is still something wrong
>
> As far as I can see, it's in your manual measurement. All of the code
> you've provided gives the same results on my PC as on yours, but your
> manual m
"ast" a écrit dans le message de
news:5a33a5aa$0$10195$426a7...@news.free.fr...
Ty Peter and Steve, I would never have found that
explanation myself
--
https://mail.python.org/mailman/listinfo/python-list
3456; print(time()-t)
>
> 0.0
Same here.
> There is still something wrong
As far as I can see, it's in your manual measurement. All of the code
you've provided gives the same results on my PC as on yours, but your
manual measurements differ drastically from mine (and my man
on my
>> system, it takes some 10 ns. The uncertainty of the timeit result is at
>> least a few hundred nanoseconds.
>
> There are more than 10 multiplications to perform on a
> soaring size integer. I have some doubts "x=123456**123456 "
> only takes 10 ns
"Thomas Jollans" a écrit dans le message de
news:mailman.74.1513341235.14074.python-l...@python.org...
On 2017-12-15 11:36, ast wrote:
No, this is right. The calculation takes practically no time; on my
system, it takes some 10 ns. The uncertainty of the timeit result is at
l
On Fri, 15 Dec 2017 10:47 pm, Thomas Jollans wrote:
> On 2017-12-15 11:36, ast wrote:
>> Hi
>>
>> Time measurment with module timeit seems to work with some statements
>> but not with some other statements on my computer.
>>
>> Python versio
On Fri, 15 Dec 2017 09:36 pm, ast wrote:
[...]
> It's OK, with 10 more loops I get 10 more execution time.
>
> But with exponentiation, it's a mess
>
>>>> Timer("x=123456**123456").timeit(1)
> 6.076191311876755e-06
>>>> Timer("x=12
Thomas Jollans wrote:
> On 2017-12-15 11:36, ast wrote:
>> Hi
>>
>> Time measurment with module timeit seems to work with some statements
>> but not with some other statements on my computer.
>>
>> Python version 3.6.3
>>
>> from timeit impo
On 2017-12-15 11:36, ast wrote:
> Hi
>
> Time measurment with module timeit seems to work with some statements
> but not with some other statements on my computer.
>
> Python version 3.6.3
>
> from timeit import Timer
>
>>>> Timer("'-&
Hi
Time measurment with module timeit seems to work with some
statements but not with some other statements on my computer.
Python version 3.6.3
from timeit import Timer
Timer("'-'.join([str(i) for i in range(10)])").timeit(1)
0.179271876732912
Timer("'
> timeit('sorter( array, size )', number=1)
I'm not a timeit whiz, but I'm kind of surprised there isn't a call form
where it goes something like
timeit(callable, *args, ...)
There is a globals keyword argument though. I think you could probably call
it w
Trying to use timeit within a function:
def test(name, sorter, size):
"""Tests and times the sorting algorithm on given array size"""
print(name,end='\t')
array = [0]*size
for i in range(size):
array[i] = randrange(20)
On Wednesday, April 22, 2015 at 10:20:58 PM UTC+5:30, Ganesh Pal wrote:
> Thank you , this answers my question : )
Hi, Thanks for asking this question, it introduced me to the timeit module.
Just a friendly, next time refrain yourself from top posting.
Cheers!
--
https://mail.python.
; I have a hunch you're mistakenly thinking that Python is only running
> through ten iterations of your for i in range(100) loop. This is
> not the case. The entire thing is running (all 100 iterations of
> your loop), but is run ten times, as that is the default for timeit
> un
loop), but is run ten times, as that is the default for timeit
> unless you specify that you want to run it more times. Hope this helps.
Actually, it's smarter than that. When running timeit from the command
line, the default is to scale the number of loops according to the
time taken.
This is
not the case. The entire thing is running (all 100 iterations of
your loop), but is run ten times, as that is the default for timeit
unless you specify that you want to run it more times. Hope this helps.
Basically timeit is doing something like this:
def mycode():
for i in ra
best of 3: 51.1 msec per loop
>
> Iam not able to understand what why only 10 loops were run ?
What behaviour did you expect? You didn't ask for any particular number
of iterations, so you've allowed the tool to choose for you
https://docs.python.org/3/library/timeit.html#cmdopt
Hi Team,
Iam running the below command on Linux machine have Python 2.7
installed , I was trying to figure out the speed difference between
xrange and range functions.
range :
python -m timeit 'for i in range(100):' ' pass'
10 loops, best of 3: 90.5 msec per loop
$ p
.25)**2 + 1 if x < 0.5 else 16*(x-0.75)**2 - 1
> ------
>
> then i used module timeit to compare its execution time with math.sin()
> I put the sinusLite() function in a module named test.
>
> then:
>
>>>> import timeit
>>>> t1
+ 1 if x < 0.5 else 16*(x-0.75)**2 - 1
> ------
>
> then i used module timeit to compare its execution time with math.sin()
> I put the sinusLite() function in a module named test.
>
> then:
>
>>>> import timeit
>>>> t1 = timeit.Ti
)**2 + 1 if x < 0.5 else 16*(x-0.75)**2 - 1
> ------
>
> then i used module timeit to compare its execution time with math.sin()
> I put the sinusLite() function in a module named test.
>
> then:
>
>>>> import timeit
>>>> t1 = t
f x < 0.5 else 16*(x-0.75)**2 - 1
> --
>
> then i used module timeit to compare its execution time with math.sin()
> I put the sinusLite() function in a module named test.
>
> then:
>
>>>> import timeit
>>>> t1 = timeit.Timer("y=test.s
Hi
I needed a function f(x) which looks like sinus(2pi.x) but faster.
I wrote this one:
--
from math import floor
def sinusLite(x):
x = x - floor(x)
return -16*(x-0.25)**2 + 1 if x < 0.5 else 16*(x-0.75)**2 - 1
--
then i used module tim
On 13/06/2014 01:44, Steven D'Aprano wrote:
On Fri, 13 Jun 2014 00:35:43 +0100, Mark Lawrence wrote:
The request is for a class within timeit that allows you to test code
inside a with block. It strikes me as being useful but there's only one
response on the issue, albeit a positiv
On 13Jun2014 00:44, Steven D'Aprano
wrote:
On Fri, 13 Jun 2014 00:35:43 +0100, Mark Lawrence wrote:
The request is for a class within timeit that allows you to test code
inside a with block. It strikes me as being useful but there's only one
response on the issue, albeit a positiv
On Fri, 13 Jun 2014 00:35:43 +0100, Mark Lawrence wrote:
> The request is for a class within timeit that allows you to test code
> inside a with block. It strikes me as being useful but there's only one
> response on the issue, albeit a positive one. If others here think thi
The request is for a class within timeit that allows you to test code
inside a with block. It strikes me as being useful but there's only one
response on the issue, albeit a positive one. If others here think this
would be a useful addition I'll see if I can take this forward, unl
On Thu, Mar 14, 2013 at 6:21 PM, Terry Reedy wrote:
> I believe everything in the doc should be in __all__. Open an issue on the
> tracker and add terry.reedy as nosy.
> Note on the issue that timeit.default_timer is not callable, contrary to the
> doc (which should also be fixed).
Thanks! Issue
On 3/14/2013 2:58 AM, Chris Angelico wrote:
While putting together some timing stats for the latest Python 3.3
string representation thread, I ran into an oddity in how IDLE handles
timeit. The normal way to profile Python code, according to stuff I've
found on the internet, is timeit.t
While putting together some timing stats for the latest Python 3.3
string representation thread, I ran into an oddity in how IDLE handles
timeit. The normal way to profile Python code, according to stuff I've
found on the internet, is timeit.timeit:
>>> import timeit
>>> ti
On Jul 22, 2:43 pm, Thomas Jollans wrote:
> On 22/07/11 14:30, Frank Millman wrote:
>
>
>
>
>
> > This is what I get after modifying timeit.py as follows -
>
> > if args is None:
> > args = sys.argv[1:]
> > + print(args)
>
> &
On 22/07/11 14:30, Frank Millman wrote:
> This is what I get after modifying timeit.py as follows -
>
> if args is None:
> args = sys.argv[1:]
> + print(args)
>
> C:\>python -m timeit int(float('165.0'))
> ["int(float('165.0
at it just
> evaluates the plain string itself instead of the code.
>
> Stefan- Hide quoted text -
>
> - Show quoted text -
This is what I get after modifying timeit.py as follows -
if args is None:
args = sys.argv[1:]
+ print(args)
C:\>python -m timeit int(floa
Thomas Rachel, 22.07.2011 10:08:
Am 22.07.2011 08:59 schrieb Frank Millman:
My guess is that it is something to do with the console, but I don't
know what. If I get time over the weekend I will try to get to the
bottom of it.
I would guess that in the first case, python (resp. timeit.py) gets
Am 22.07.2011 08:59 schrieb Frank Millman:
My guess is that it is something to do with the console, but I don't
know what. If I get time over the weekend I will try to get to the
bottom of it.
I would guess that in the first case, python (resp. timeit.py) gets the
intended code for execution:
On Jul 22, 8:37 am, Stefan Behnel wrote:
> Frank Millman, 22.07.2011 08:06:
>
>
>
>
>
> > I mentioned in a recent post that I noticed an inconsistency in timeit, and
> > then reported that I must have made a mistake.
>
> > I have now identified my prob
Frank Millman, 22.07.2011 08:06:
I mentioned in a recent post that I noticed an inconsistency in timeit, and
then reported that I must have made a mistake.
I have now identified my problem, but I don't understand it.
C:\Python32\Lib>timeit.py "int(float('165.0'))"
1
Hi all
I mentioned in a recent post that I noticed an inconsistency in timeit, and
then reported that I must have made a mistake.
I have now identified my problem, but I don't understand it.
C:\Python32\Lib>timeit.py "int(float('165.0'))"
10 loops, best
wondering if the timeit function would be helpful in my case. I
was thinking to open a subprocess to run the Unix command 10 times
(instead of 1 million times) and then do the average and then do the
graph. Any thoughts about this?
Is timeit the right tool for what I am trying to do?
TIA...
--
http
On Tue, 27 Oct 2009 04:36:12 +, John O'Hagan wrote:
> I sometimes use timeit to see if it's better to check if something needs
> doing, or to just do it anyway. This result was surprising:
>
> setup = 'd1 = {"a":0, "b":0}; d2 = {"a&q
On Tue, 27 Oct 2009, Paul Rubin wrote:
> "John O'Hagan" writes:
> > Timer('d1.update(d2)', setup).timeit()
> > 2.6499271392822266
> >
> > Timer('if d1 != d2: d1.update(d2)', setup).timeit()
> > 1.0235211849212646
> >
"John O'Hagan" writes:
> Timer('d1.update(d2)', setup).timeit()
> 2.6499271392822266
>
> Timer('if d1 != d2: d1.update(d2)', setup).timeit()
> 1.0235211849212646
>
> In other words, in this case it's substantially quicker to check
I sometimes use timeit to see if it's better to check if something needs doing,
or to just do it anyway. This result was surprising:
setup = 'd1 = {"a":0, "b":0}; d2 = {"a":0, "b":1}'
Timer('d1.update(d2)', setup).timeit()
2.64
ld only come up with this:
>
> timeit.template = 'from __future__ import with_statement\n' +
> timeit.template
>
> timeit should directly support importing __future__ stuff...
Yes, it probably should. Please make a bug report/feature request at the
Python bug tracker. If
from __future__ import with_statement\n' +
timeit.template
timeit should directly support importing __future__ stuff...
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano writes:
> I don't understand why my recursive function hits the recursion
> limit inside the timeit.Timer when it works outside of it.
Probably because your test function is at the very edge of the
recursion limit, and timeit.Timer triggers it because it calls it at a
deeper stac
namekuseijin schrieb:
Recursion is unpythonic. Do not use it.
Since when? Says who?
Lacking tail-recursion, it's not the choice for loops, but whatever
algorithm is recursive can be written as such.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, May 3, 2009 at 11:27 PM, namekuseijin
wrote:
> Recursion is unpythonic. Do not use it.
That's a tad extreme. I think the accepted practice is merely not to
use recursion gratuitously.
Cheers,
Chris
--
http://blog.rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list
Recursion is unpythonic. Do not use it.
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano schrieb:
I'm seeing a strange interaction between timeit and recursion.
sys.getrecursionlimit()
1000
from timeit import Timer
setup = """def test(n=1):
... if n < 999: return test(n+1)
... return None
... """
exec setup
I'm seeing a strange interaction between timeit and recursion.
>>> sys.getrecursionlimit()
1000
>>> from timeit import Timer
>>> setup = """def test(n=1):
... if n < 999: return test(n+1)
... return None
... """
>>>
On Wed, 18 Feb 2009 17:35:16 -0800, cokofreedom wrote:
> I am really stuck trying to work out how to pass variables to timeit to
> allow me to run any of the examples...
setup = "from __main__ import example1, example2, example3"
Timer("example1()", setup)
In Py
I've having an annoying problem at the moment. I'm writing code for
the travelling salesmen problem and comparing different techniques.
But I've having a problem using timeit.
I have a file called "testplatform.py" that contains 4 class:
Test() - which is called first to
vedrandeko...@yahoo.com wrote:
> On 1 velj, 17:42, Steve Holden wrote:
>> vedrandeko...@yahoo.com wrote:
>>> Hello,
>>> When I run following code with os.popen (for this time measure I'm
>>> using python module timeit):
>>> for i i
On 1 velj, 17:42, Steve Holden wrote:
> vedrandeko...@yahoo.com wrote:
> > Hello,
>
> > When I run following code with os.popen (for this time measure I'm
> > using python module timeit):
>
> > for i in range(50):
> > print i
>
> > I ge
vedrandeko...@yahoo.com wrote:
> Hello,
>
> When I run following code with os.popen (for this time measure I'm
> using python module timeit):
>
>
> for i in range(50):
> print i
>
>
> I get this result: 0.00246958761519
>
>
> But w
Hello,
When I run following code with os.popen (for this time measure I'm
using python module timeit):
for i in range(50):
print i
I get this result: 0.00246958761519
But when I run same code from IDLE i get this result:
6.4533341528e-005
now, I have two questions:
George Sakkis wrote:
> I'm afraid that the taken approach is worse than your patch. For one
> thing, it allows only zero-arg functions. Of course one can work
> around it by passing "lambda: f(...)" but that's adding extra overhead
> which can be measurable for small fast functions. Even if passin
>> >> Second try:
> >> > ...
> >> >> Horrible, I know. Those wrapper1,wrapper2,wrapper3... keep growing
> >> >> with each call. But it's the only way I could find, at least without
> >> >> changing the code template used by
hose wrapper1,wrapper2,wrapper3... keep growing
>> >> with each call. But it's the only way I could find, at least without
>> >> changing the code template used by timeit.
>>
>> > Eeek. Talk about namespace pollution.
>>
>> > Thanks for the
On Sun, 30 Mar 2008 15:03:21 +0200, Peter Otten wrote:
> Maybe the following enhancement of timeit would be worthwhile?
[snip]
Passing a namespace argument would be excellent.
> By the way, haven't we been there before, two years ago?
>
> http://mail.python.org/pipermail
h
> >> each call. But it's the only way I could find, at least without changing
> >> the code template used by timeit.
>
> > Eeek. Talk about namespace pollution.
>
> > Thanks for the effort, but if that's the only solution, I think the
> > solutio
Steven D'Aprano wrote:
> On Sun, 30 Mar 2008 01:27:18 -0300, Gabriel Genellina wrote:
>
>> Second try:
> ...
>> Horrible, I know. Those wrapper1,wrapper2,wrapper3... keep growing with
>> each call. But it's the only way I could find, at least without changin
On Sun, 30 Mar 2008 10:55:25 +, Steven D'Aprano wrote:
> Perhaps it's time for me to take a different approach. Since I can't
> call timeit, and I can't inherit from it (same problem with state being
> shared between instances), perhaps I should write my own
On Sun, 30 Mar 2008 01:27:18 -0300, Gabriel Genellina wrote:
> Second try:
...
> Horrible, I know. Those wrapper1,wrapper2,wrapper3... keep growing with
> each call. But it's the only way I could find, at least without changing
> the code template used by timeit.
Eeek. Tal
arguments are provided to me as
>> Python objects, but timeit requires strings. Converting the objects to
>> strings is not practical, and the objects might not exist in the
>> __main__ module.
>
> Ah, ok, I understand now. I think this is more-or-less what you want:
[s
En Sun, 30 Mar 2008 00:20:34 -0300, Steven D'Aprano
<[EMAIL PROTECTED]> escribió:
> On Sat, 29 Mar 2008 21:12:33 -0300, Gabriel Genellina wrote:
>
>> def main():
>>global func
>>func = factory()
>>return timeit.Timer('func()', &
En Sat, 29 Mar 2008 23:23:07 -0300, Steven D'Aprano
<[EMAIL PROTECTED]> escribió:
> The general problem is that I wish to time an arbitrary function with
> arbitrary arguments. The function and arguments are provided to me as
> Python objects, but timeit requires strings. Co
On Sat, 29 Mar 2008 21:12:33 -0300, Gabriel Genellina wrote:
> Or maybe:
>
> def main():
>global func
>func = factory()
>return timeit.Timer('func()', 'from __main__ import func').timeit()
Alas, this does not work, because all the Timer inst
le:
>>
>>
>> def factory():
>> def f():
>> return "spam"
>> return f
>>
>> def main():
>> func = factory()
>> return timeit.Timer('func()', 'from __main__ import func').timeit()
>
>
#x27;from __main__ import spam')
>
>
> But now I find myself wanting to time a function that's not defined in
> __main__. Here's a illustrative example:
>
>
> def factory():
> def f():
> return "spam"
> return f
>
> def main
27;s a illustrative example:
def factory():
def f():
return "spam"
return f
def main():
func = factory()
return timeit.Timer('func()', 'from __main__ import func').timeit()
But it doesn't work:
>>> main()
Traceback (most recent
result = 20 + 2
> > def run(self):
> > #do stuff
> > aFunction()
> > #do other stuff
> > import timeit
>
> > t = timeit.Timer("d.aFunction()", "from __main__ import Dog; d =
> > Dog()")
> > print t.timeit()
>
result = 20 + 2
> > def run(self):
> > #do stuff
> > aFunction()
> > #do other stuff
> > import timeit
>
> > t = timeit.Timer("d.aFunction()", "from __main__ import Dog; d =
> > Dog()")
> > print t.timeit()
>
On May 24, 12:41 pm, 7stud <[EMAIL PROTECTED]> wrote:
> Actually, you can do this:
>
> class Dog(object):
> def aFunction(self):
> result = 20 + 2
> def run(self):
> #do stuff
> aFunction()
> #do other stuff
> import time
On May 24, 12:41 pm, 7stud <[EMAIL PROTECTED]> wrote:
> Actually, you can do this:
>
> class Dog(object):
> def aFunction(self):
> result = 20 + 2
> def run(self):
> #do stuff
> aFunction()
> #do other stuff
> import time
Actually, you can do this:
class Dog(object):
def aFunction(self):
result = 20 + 2
def run(self):
#do stuff
aFunction()
#do other stuff
import timeit
t = timeit.Timer("d.aFunction()", "from __main__ import Dog; d =
Dog()")
print t.timei
On May 24, 11:30 am, 7stud <[EMAIL PROTECTED]> wrote:
> On May 24, 9:36 am, "[EMAIL PROTECTED]"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > Hi,
>
> > I am using timeit to time a global function like this
>
> > t = timeit.Timer("
On May 24, 9:36 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using timeit to time a global function like this
>
> t = timeit.Timer("timeTest()","from __main__ import timeTest")
> result = t.timeit();
>
> But
On May 24, 8:36 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using timeit to time a global function like this
>
> t = timeit.Timer("timeTest()","from __main__ import timeTest")
> result = t.timeit();
>
> But
Hi,
I am using timeit to time a global function like this
t = timeit.Timer("timeTest()","from __main__ import timeTest")
result = t.timeit();
But how can i use timeit to time a function in a class?
class FetchUrlThread(threading.Thread):
def aFunction(self):
On Fri, 03 Nov 2006 18:02:37 -0800, Carl Banks wrote:
>>>> import timeit
>>>> timeit.Timer("foo(1)","from __main__ import foo")
> 1.1497418880462646
Well, that was scarily simple.
Thank you.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> The timeit module is ideal for measuring small code snippets; I want to
> measure large function objects.
>
> Because the timeit module takes the code snippet argument as a string, it
> is quite handy to use from the command line, but it is less con
The timeit module is ideal for measuring small code snippets; I want to
measure large function objects.
Because the timeit module takes the code snippet argument as a string, it
is quite handy to use from the command line, but it is less convenient for
timing large pieces of code or when working
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
"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
"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
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" &q
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
"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
"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
1 - 100 of 135 matches
Mail list logo