Profiling very small/quick functions, help!?

Aaron Watters aaron.watters at gmail.com
Wed Apr 16 13:29:36 EDT 2008


On Apr 16, 12:35 pm, skanem... at yahoo.se wrote:
> if __name__=="__main__":
>     try:
>         from cProfile import run
>     except:
>         from profile import run
>     for x in range(1, 10000):
>         run("power(10,10)")

def test1():
    for x in xrange(1,10000):
        test = power(10,10)

if __name__=="__main__":
     try:
         from cProfile import run
     except:
         from profile import run
     for x in range(1, 10000):
         run("test1()")

all the best!  -- Aaron Watters
===
http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=jar





More information about the Python-list mailing list