File size: 1,768 Bytes
065fee7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
#!/bin/sh
echo "\$ python -m timeit -s 'import benchmarks' 'benchmarks.function3()'"
python -m timeit -s 'import benchmarks' 'benchmarks.function3()'
echo
sleep 5
echo "\$ python -m timeit -s 'import benchmarks; c=benchmarks.Class()' 'c.function3()'"
python -m timeit -s 'import benchmarks; c=benchmarks.Class()' 'c.function3()'
echo
sleep 5
echo "\$ python -m timeit -s 'import benchmarks' 'benchmarks.Class.function3cmo()'"
python -m timeit -s 'import benchmarks' 'benchmarks.Class.function3cmo()'
echo
sleep 5
echo "\$ python -m timeit -s 'import benchmarks; c=benchmarks.Class()' 'c.function3cmo()'"
python -m timeit -s 'import benchmarks; c=benchmarks.Class()' 'c.function3cmo()'
echo
sleep 5
echo "\$ python -m timeit -s 'import benchmarks' 'benchmarks.Class.function3cmi()'"
python -m timeit -s 'import benchmarks' 'benchmarks.Class.function3cmi()'
echo
sleep 5
echo "\$ python -m timeit -s 'import benchmarks; c=benchmarks.Class()' 'c.function3cmi()'"
python -m timeit -s 'import benchmarks; c=benchmarks.Class()' 'c.function3cmi()'
echo
sleep 5
echo "\$ python -m timeit -s 'import benchmarks' 'benchmarks.Class.function3smo()'"
python -m timeit -s 'import benchmarks' 'benchmarks.Class.function3smo()'
echo
sleep 5
echo "\$ python -m timeit -s 'import benchmarks; c=benchmarks.Class()' 'c.function3smo()'"
python -m timeit -s 'import benchmarks; c=benchmarks.Class()' 'c.function3smo()'
echo
sleep 5
echo "\$ python -m timeit -s 'import benchmarks' 'benchmarks.Class.function3smi()'"
python -m timeit -s 'import benchmarks' 'benchmarks.Class.function3smi()'
echo
sleep 5
echo "\$ python -m timeit -s 'import benchmarks; c=benchmarks.Class()' 'c.function3smi()'"
python -m timeit -s 'import benchmarks; c=benchmarks.Class()' 'c.function3smi()'
echo
|