blob: a57a5272a778f942a0faea45ef76556b4ef1f4d7 [file] [log] [blame]
Yesudeep Mangalapillya4453c62011-08-11 12:03:37 +05301#!/bin/sh
2
3echo "int2bytes speed test"
Yesudeep Mangalapilly03c51e72011-08-16 14:30:48 +05304echo "pypy"
5pypy -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
6pypy -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
Yesudeep Mangalapillya4453c62011-08-11 12:03:37 +05307echo "python2.5"
8python2.5 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
Yesudeep Mangalapilly81325242011-08-12 13:06:51 +05309python2.5 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
Yesudeep Mangalapillya4453c62011-08-11 12:03:37 +053010echo "python2.6"
Yesudeep Mangalapilly81325242011-08-12 13:06:51 +053011python2.6 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n, 516)'
12python2.6 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n, 516)'
Yesudeep Mangalapillya4453c62011-08-11 12:03:37 +053013echo "python2.7"
14python2.7 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
Yesudeep Mangalapilly81325242011-08-12 13:06:51 +053015python2.7 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
Yesudeep Mangalapillya4453c62011-08-11 12:03:37 +053016echo "python3.2"
17python3 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
Yesudeep Mangalapilly81325242011-08-12 13:06:51 +053018python3 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
19
Yesudeep Mangalapillyce4ede72011-08-12 15:29:31 +053020echo "bit_size speed test"
21echo "python2.5"
22python2.5 -mtimeit -s'from rsa.common import bit_size; n = 1<<4096' 'bit_size(n)'
23python2.5 -mtimeit -s'from rsa.common import _bit_size; n = 1<<4096' '_bit_size(n)'
24echo "python2.6"
25python2.6 -mtimeit -s'from rsa.common import bit_size; n = 1<<4096' 'bit_size(n)'
26python2.6 -mtimeit -s'from rsa.common import _bit_size; n = 1<<4096' '_bit_size(n)'
27echo "python2.7"
28python2.7 -mtimeit -s'from rsa.common import bit_size; n = 1<<4096' 'bit_size(n)'
29python2.7 -mtimeit -s'from rsa.common import _bit_size; n = 1<<4096' '_bit_size(n)'
30echo "python3.2"
31python3 -mtimeit -s'from rsa.common import bit_size; n = 1<<4096' 'bit_size(n)'
32python3 -mtimeit -s'from rsa.common import _bit_size; n = 1<<4096' '_bit_size(n)'
33echo "pypy"
34pypy -mtimeit -s'from rsa.common import bit_size; n = 1<<4096' 'bit_size(n)'
35pypy -mtimeit -s'from rsa.common import _bit_size; n = 1<<4096' '_bit_size(n)'
36