Completes machine-aligned int2bytes implementation.
* This implementation is generally in microseconds
instead of milliseconds, which makes it 20x-40x faster
than the older implementation. Tests for all of the behavior
of the function have been added to tests/test_transform.py.
Hope this helps make python-rsa even better. =)
diff --git a/speed.sh b/speed.sh
index a9a1431..a2c4014 100755
--- a/speed.sh
+++ b/speed.sh
@@ -13,4 +13,7 @@
echo "python3.2"
python3 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
python3 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'
+echo "pypy"
+pypy -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)'
+pypy -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)'