~certify-web-dev/twisted/certify-trunk

1
2
3
4
5
6
7
8
9
10
#!/usr/bin/python

from timer import timeit
from twisted.spread.banana import b1282int

ITERATIONS = 100000

for length in (1, 5, 10, 50, 100):
    elapsed = timeit(b1282int, ITERATIONS, "\xff" * length)
    print "b1282int %3d byte string: %10d cps" % (length, ITERATIONS / elapsed)