summaryrefslogtreecommitdiff
path: root/speed.sh
diff options
context:
space:
mode:
authorYesudeep Mangalapilly <yesudeep@gmail.com>2011-08-12 13:06:51 +0530
committerYesudeep Mangalapilly <yesudeep@gmail.com>2011-08-12 13:06:51 +0530
commitb7341b658d6d2285676ce0b3c287383ad69a293e (patch)
tree2610f797f057feedec88d13d9ed7d16efe5c4232 /speed.sh
parenta5673890cec3d7518726b15d4cecc17c0b55aa4a (diff)
downloadrsa-b7341b658d6d2285676ce0b3c287383ad69a293e.tar.gz
Adds verification tests for int2bytes and bytes2int
* There is a bug in the older int2bytes implementation. I've raised an issue on bitbucket for that already. #11 The pkcs1 file verification test fails if the behavior for int2bytes is corrected.
Diffstat (limited to 'speed.sh')
-rwxr-xr-xspeed.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/speed.sh b/speed.sh
index 17f1ea4..a9a1431 100755
--- a/speed.sh
+++ b/speed.sh
@@ -3,13 +3,14 @@
echo "int2bytes speed test"
echo "python2.5"
python2.5 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
-python2.5 -mtimeit -s'from rsa.transform import old_int2bytes; n = 1<<4096' 'old_int2bytes(n)'
+python2.5 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
echo "python2.6"
-python2.6 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
-python2.6 -mtimeit -s'from rsa.transform import old_int2bytes; n = 1<<4096' 'old_int2bytes(n)'
+python2.6 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n, 516)'
+python2.6 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n, 516)'
echo "python2.7"
python2.7 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
-python2.7 -mtimeit -s'from rsa.transform import old_int2bytes; n = 1<<4096' 'old_int2bytes(n)'
+python2.7 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
echo "python3.2"
python3 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
-python3 -mtimeit -s'from rsa.transform import old_int2bytes; n = 1<<4096' 'old_int2bytes(n)'
+python3 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
+