Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 09408f3c1571cbb746da49a1d2f22702 > files > 2725

python-twisted-17.5.0-1.mga6.x86_64.rpm

#!/usr/bin/python
from __future__ import print_function

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))