[tahoe-lafs-trac-stream] [pycryptopp] #85: disable asm
pycryptopp
trac at tahoe-lafs.org
Sun Jan 3 22:27:40 UTC 2016
#85: disable asm
---------------------------------+-----------------------
Reporter: zooko | Owner: daira
Type: enhancement | Status: new
Priority: major | Milestone:
Version: 0.5.29 | Resolution:
Keywords: design-review-needed | Launchpad Bug:
---------------------------------+-----------------------
Comment (by zooko):
We applied the first two patches from https://github.com/tahoe-
lafs/pycryptopp/pull/26
(https://github.com/twopir/pycryptopp/commit/b4cb7086cba8ebfdc90fe63b1da879a7ce84c03f
and
https://github.com/twopir/pycryptopp/commit/cd7a209d10992b87bbbfd70846ee561b6bb218b9),
asked Jeromy "whyrusleeping" Johnson to manually verify that this made the
build go from failing to working on his Mac OS X 10.10.5 (see
https://github.com/tahoe-lafs/pycryptopp/pull/27), and then ran benchmarks
before and after the patch on my Google Chromebook Pixel 1 (Intel(R)
Core(TM) i5-3427U CPU @ 1.80GHz). The benchmarks (shown below) showed as
expected: no change for ECDSA, Ed25519, RSA, or hashlib, and small change
in performance for AES, XSalsa20, and SHA256.
benchmarks of current trunk with asm enabled:
{{{
zooko at spark ~/playground/pycryptopp $ time python setup.py bench
running bench
<class 'pycryptopp.bench.bench_sigs.ECDSA256'>
generate key
best: 4.350e-02, 1th-best: 4.350e-02, mean: 4.350e-02, 1th-worst:
4.350e-02, worst: 4.350e-02 (of 1)
sign
best: 9.089e-01, 1th-best: 9.089e-01, mean: 9.089e-01, 1th-worst:
9.089e-01, worst: 9.089e-01 (of 1)
verify
best: 3.479e+00, 1th-best: 3.479e+00, mean: 3.479e+00, 1th-worst:
3.479e+00, worst: 3.479e+00 (of 1)
<class 'pycryptopp.bench.bench_sigs.Ed25519'>
generate key
best: 1.825e+00, 1th-best: 1.825e+00, mean: 1.825e+00, 1th-worst:
1.825e+00, worst: 1.825e+00 (of 1)
sign
best: 1.830e+00, 1th-best: 1.830e+00, mean: 1.830e+00, 1th-worst:
1.830e+00, worst: 1.830e+00 (of 1)
verify
best: 6.249e+00, 1th-best: 6.249e+00, mean: 6.249e+00, 1th-worst:
6.249e+00, worst: 6.249e+00 (of 1)
<class 'pycryptopp.bench.bench_sigs.RSA2048'>
generate key
best: 9.093e+01, 1th-best: 9.093e+01, mean: 9.093e+01, 1th-worst:
9.093e+01, worst: 9.093e+01 (of 1)
sign
best: 1.963e+00, 1th-best: 1.963e+00, mean: 1.963e+00, 1th-worst:
1.963e+00, worst: 1.963e+00 (of 1)
verify
best: 4.617e-02, 1th-best: 4.617e-02, mean: 4.617e-02, 1th-worst:
4.617e-02, worst: 4.617e-02 (of 1)
<class 'pycryptopp.bench.bench_sigs.RSA3248'>
generate key
best: 5.065e+02, 1th-best: 5.065e+02, mean: 5.065e+02, 1th-worst:
5.065e+02, worst: 5.065e+02 (of 1)
sign
best: 1.006e+01, 1th-best: 1.006e+01, mean: 1.006e+01, 1th-worst:
1.006e+01, worst: 1.006e+01 (of 1)
verify
best: 1.068e-01, 1th-best: 1.068e-01, mean: 1.068e-01, 1th-worst:
1.068e-01, worst: 1.068e-01 (of 1)
milliseconds per operation
<AES-128>
large (10000000 B)
best: 3.982e+00, 1th-best: 3.982e+00, mean: 3.982e+00, 1th-worst:
3.982e+00, worst: 3.982e+00 (of 1)
<AES-256>
large (10000000 B)
best: 5.422e+00, 1th-best: 5.422e+00, mean: 5.422e+00, 1th-worst:
5.422e+00, worst: 5.422e+00 (of 1)
<XSalsa20-256>
large (10000000 B)
best: 1.387e+00, 1th-best: 1.387e+00, mean: 1.387e+00, 1th-worst:
1.387e+00, worst: 1.387e+00 (of 1)
nanoseconds per byte crypted
<class 'pycryptopp.bench.bench_hashes.SHA256'>
large (10000000 B)
best: 5.136e+00, 1th-best: 5.136e+00, mean: 5.136e+00, 1th-worst:
5.136e+00, worst: 5.136e+00 (of 1)
<class 'pycryptopp.bench.bench_hashes.hashlibSHA256'>
large (10000000 B)
best: 4.798e+00, 1th-best: 4.798e+00, mean: 4.798e+00, 1th-worst:
4.798e+00, worst: 4.798e+00 (of 1)
nanoseconds per byte hashed
}}}
benchmarks with these two patches that disable asm:
{{{
running bench
<class 'pycryptopp.bench.bench_sigs.ECDSA256'>
generate key
best: 4.385e-02, 1th-best: 4.385e-02, mean: 4.385e-02, 1th-worst:
4.385e-02, worst: 4.385e-02 (of 1)
sign
best: 9.948e-01, 1th-best: 9.948e-01, mean: 9.948e-01, 1th-worst:
9.948e-01, worst: 9.948e-01 (of 1)
verify
best: 3.936e+00, 1th-best: 3.936e+00, mean: 3.936e+00, 1th-worst:
3.936e+00, worst: 3.936e+00 (of 1)
<class 'pycryptopp.bench.bench_sigs.Ed25519'>
generate key
best: 1.818e+00, 1th-best: 1.818e+00, mean: 1.818e+00, 1th-worst:
1.818e+00, worst: 1.818e+00 (of 1)
sign
best: 1.823e+00, 1th-best: 1.823e+00, mean: 1.823e+00, 1th-worst:
1.823e+00, worst: 1.823e+00 (of 1)
verify
best: 6.178e+00, 1th-best: 6.178e+00, mean: 6.178e+00, 1th-worst:
6.178e+00, worst: 6.178e+00 (of 1)
<class 'pycryptopp.bench.bench_sigs.RSA2048'>
generate key
best: 6.325e+01, 1th-best: 6.325e+01, mean: 6.325e+01, 1th-worst:
6.325e+01, worst: 6.325e+01 (of 1)
sign
best: 2.136e+00, 1th-best: 2.136e+00, mean: 2.136e+00, 1th-worst:
2.136e+00, worst: 2.136e+00 (of 1)
verify
best: 4.965e-02, 1th-best: 4.965e-02, mean: 4.965e-02, 1th-worst:
4.965e-02, worst: 4.965e-02 (of 1)
<class 'pycryptopp.bench.bench_sigs.RSA3248'>
generate key
best: 7.379e+02, 1th-best: 7.379e+02, mean: 7.379e+02, 1th-worst:
7.379e+02, worst: 7.379e+02 (of 1)
sign
best: 1.139e+01, 1th-best: 1.139e+01, mean: 1.139e+01, 1th-worst:
1.139e+01, worst: 1.139e+01 (of 1)
verify
best: 1.213e-01, 1th-best: 1.213e-01, mean: 1.213e-01, 1th-worst:
1.213e-01, worst: 1.213e-01 (of 1)
milliseconds per operation
<AES-128>
large (10000000 B)
best: 7.006e+00, 1th-best: 7.006e+00, mean: 7.006e+00, 1th-worst:
7.006e+00, worst: 7.006e+00 (of 1)
<AES-256>
large (10000000 B)
best: 9.376e+00, 1th-best: 9.376e+00, mean: 9.376e+00, 1th-worst:
9.376e+00, worst: 9.376e+00 (of 1)
<XSalsa20-256>
large (10000000 B)
best: 5.388e+00, 1th-best: 5.388e+00, mean: 5.388e+00, 1th-worst:
5.388e+00, worst: 5.388e+00 (of 1)
nanoseconds per byte crypted
<class 'pycryptopp.bench.bench_hashes.SHA256'>
large (10000000 B)
best: 6.213e+00, 1th-best: 6.213e+00, mean: 6.213e+00, 1th-worst:
6.213e+00, worst: 6.213e+00 (of 1)
<class 'pycryptopp.bench.bench_hashes.hashlibSHA256'>
large (10000000 B)
best: 4.839e+00, 1th-best: 4.839e+00, mean: 4.839e+00, 1th-worst:
4.839e+00, worst: 4.839e+00 (of 1)
nanoseconds per byte hashed
}}}
--
Ticket URL: <https://tahoe-lafs.org/trac/pycryptopp/ticket/85#comment:28>
pycryptopp <https://Tahoe-LAFS.org/trac/pycryptopp>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list