Ticket #225: encode_int_benchmark.py

File encode_int_benchmark.py, 204 bytes (added by nick, 9 months ago)

python benchmark script

Line 
1from encode_int import encode_int
2from pyamf.amf3 import _encode_int
3
4import cProfile
5
6def r(f):
7    for i in range(0, 0x40000):
8        f(i)
9
10cProfile.run('r(_encode_int)')
11cProfile.run('r(encode_int)')