blob: a2c4014b4284c90dc777ebf6699a15a25e13ace9 [file] [log] [blame]
Yesudeep Mangalapillya4453c62011-08-11 12:03:37 +05301#!/bin/sh
2
3echo "int2bytes speed test"
4echo "python2.5"
5python2.5 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
Yesudeep Mangalapilly81325242011-08-12 13:06:51 +05306python2.5 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
Yesudeep Mangalapillya4453c62011-08-11 12:03:37 +05307echo "python2.6"
Yesudeep Mangalapilly81325242011-08-12 13:06:51 +05308python2.6 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n, 516)'
9python2.6 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n, 516)'
Yesudeep Mangalapillya4453c62011-08-11 12:03:37 +053010echo "python2.7"
11python2.7 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
Yesudeep Mangalapilly81325242011-08-12 13:06:51 +053012python2.7 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
Yesudeep Mangalapillya4453c62011-08-11 12:03:37 +053013echo "python3.2"
14python3 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
Yesudeep Mangalapilly81325242011-08-12 13:06:51 +053015python3 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
Yesudeep Mangalapilly167f4882011-08-12 13:12:06 +053016echo "pypy"
17pypy -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
18pypy -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
Yesudeep Mangalapilly81325242011-08-12 13:06:51 +053019