Performance Measurement : Timer « Development « Python






Performance Measurement

Performance Measurement
from timeit import Timer
print Timer('t=a; a=b; b=t', 'a=1; b=2').timeit()

print Timer('a,b = b,a', 'a=1; b=2').timeit()

           
       

Related examples in the same category