Skip to content

Instantly share code, notes, and snippets.

@seb-m
Created January 23, 2011 00:19
Show Gist options
  • Save seb-m/791655 to your computer and use it in GitHub Desktop.
Save seb-m/791655 to your computer and use it in GitHub Desktop.
Comparison between Python2.[4-7], Python3.1 and PyPy 1.4.1 on an Python ECDSA implementation
# These timings represent pairs of ECDSA signature/verification involving
# commons field operations.
#
# See the ECDSA example from wcurve:
# - https://github.com/seb-m/wcurve
# - https://github.com/seb-m/wcurve/blob/master/examples/ecdsa.py
#
# System: Ubuntu 10.10 32bits, intel core i7 920
#
$ ./run.sh
>> /home/ookoi/Bureau/pypy-1.4.1-linux/bin/pypy ecdsa.py
secp256r1 : sign=0.173s verify=0.338s valid=True
secp256r1_curve_infective: sign=0.244s verify=0.344s valid=True
>> python2.4 ecdsa.py
secp256r1 : sign=0.249s verify=0.497s valid=True
secp256r1_curve_infective: sign=0.368s verify=0.490s valid=True
>> python2.5 ecdsa.py
secp256r1 : sign=0.249s verify=0.496s valid=True
secp256r1_curve_infective: sign=0.371s verify=0.498s valid=True
>> python2.6 ecdsa.py
secp256r1 : sign=0.038s verify=0.075s valid=True
secp256r1_curve_infective: sign=0.065s verify=0.075s valid=True
>> python2.7 ecdsa.py
secp256r1 : sign=0.035s verify=0.068s valid=True
secp256r1_curve_infective: sign=0.057s verify=0.068s valid=True
>> python3.1 ecdsa.py
secp256r1 : sign=0.033s verify=0.064s valid=True
secp256r1_curve_infective: sign=0.055s verify=0.065s valid=True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment