Yesudeep Mangalapilly | a4453c6 | 2011-08-11 12:03:37 +0530 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | echo "int2bytes speed test" |
| 4 | echo "python2.5" |
| 5 | python2.5 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)' |
Yesudeep Mangalapilly | 8132524 | 2011-08-12 13:06:51 +0530 | [diff] [blame] | 6 | python2.5 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)' |
Yesudeep Mangalapilly | a4453c6 | 2011-08-11 12:03:37 +0530 | [diff] [blame] | 7 | echo "python2.6" |
Yesudeep Mangalapilly | 8132524 | 2011-08-12 13:06:51 +0530 | [diff] [blame] | 8 | python2.6 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n, 516)' |
| 9 | python2.6 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n, 516)' |
Yesudeep Mangalapilly | a4453c6 | 2011-08-11 12:03:37 +0530 | [diff] [blame] | 10 | echo "python2.7" |
| 11 | python2.7 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)' |
Yesudeep Mangalapilly | 8132524 | 2011-08-12 13:06:51 +0530 | [diff] [blame] | 12 | python2.7 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)' |
Yesudeep Mangalapilly | a4453c6 | 2011-08-11 12:03:37 +0530 | [diff] [blame] | 13 | echo "python3.2" |
| 14 | python3 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)' |
Yesudeep Mangalapilly | 8132524 | 2011-08-12 13:06:51 +0530 | [diff] [blame] | 15 | python3 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)' |
Yesudeep Mangalapilly | 167f488 | 2011-08-12 13:12:06 +0530 | [diff] [blame] | 16 | echo "pypy" |
| 17 | pypy -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)' |
| 18 | pypy -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)' |
Yesudeep Mangalapilly | 8132524 | 2011-08-12 13:06:51 +0530 | [diff] [blame] | 19 | |
Yesudeep Mangalapilly | ce4ede7 | 2011-08-12 15:29:31 +0530 | [diff] [blame] | 20 | echo "bit_size speed test" |
| 21 | echo "python2.5" |
| 22 | python2.5 -mtimeit -s'from rsa.common import bit_size; n = 1<<4096' 'bit_size(n)' |
| 23 | python2.5 -mtimeit -s'from rsa.common import _bit_size; n = 1<<4096' '_bit_size(n)' |
| 24 | echo "python2.6" |
| 25 | python2.6 -mtimeit -s'from rsa.common import bit_size; n = 1<<4096' 'bit_size(n)' |
| 26 | python2.6 -mtimeit -s'from rsa.common import _bit_size; n = 1<<4096' '_bit_size(n)' |
| 27 | echo "python2.7" |
| 28 | python2.7 -mtimeit -s'from rsa.common import bit_size; n = 1<<4096' 'bit_size(n)' |
| 29 | python2.7 -mtimeit -s'from rsa.common import _bit_size; n = 1<<4096' '_bit_size(n)' |
| 30 | echo "python3.2" |
| 31 | python3 -mtimeit -s'from rsa.common import bit_size; n = 1<<4096' 'bit_size(n)' |
| 32 | python3 -mtimeit -s'from rsa.common import _bit_size; n = 1<<4096' '_bit_size(n)' |
| 33 | echo "pypy" |
| 34 | pypy -mtimeit -s'from rsa.common import bit_size; n = 1<<4096' 'bit_size(n)' |
| 35 | pypy -mtimeit -s'from rsa.common import _bit_size; n = 1<<4096' '_bit_size(n)' |
| 36 | |