Use faster byteswapping and avoid alignment-increasing casts #216
pull sipa wants to merge 1 commits into bitcoin-core:master from sipa:byteswap changing 3 files +44 −55-
sipa commented at 0:25 am on February 15, 2015: contributor
-
sipa commented at 4:18 am on February 15, 2015: contributor9% faster SHA256 and RFC6979.
-
gmaxwell commented at 8:08 am on February 15, 2015: contributorACK. (remind me to test on BE if I forget to remove this request.)
-
sipa commented at 7:31 pm on February 16, 2015: contributorclang seems to warn about changed alignment when casting. I don’t see why that is a problem, so perhaps we should try to avoid that warning?
-
theuni commented at 6:49 am on February 19, 2015: contributor@sipa I took a quick stab at avoiding changing alignment requirements: https://github.com/theuni/secp256k1/commit/78df7673f9d31627ae6425face109a0df6ac08ac just to see how much trouble it’d be. Assuming I didn’t muck it up too badly, overhead seems minimal. It’s hard to imagine this causing any real issues, though.
-
sipa commented at 9:48 am on February 21, 2015: contributorHmm, a 1% slowdown. This shouldn’t be necessary at all…
-
sipa force-pushed on Feb 22, 2015
-
sipa renamed this:
Use byteswapping where available, instead of manual shifting
Use faster byteswapping and avoid alignment-increasing casts
on Feb 22, 2015 -
sipa commented at 2:31 pm on February 22, 2015: contributor
I’ve rewritten this based on @theuni’s suggestion, taking it a step further. Oddly enough, it’s even faster than the previous version.
Also, I’ve just switched to a different byteswapping macro, which recent GCC at -O2 and above automatically convert to a bswap instruction.
-
sipa commented at 11:21 am on February 23, 2015: contributor10.5% faster hashing now.
-
Use faster byteswapping and avoid alignment-increasing casts. ae55e850c7
-
sipa force-pushed on Feb 23, 2015
-
theuni commented at 11:29 pm on February 23, 2015: contributorNice! Tested ACK. Roughly an 8% speedup here from a very quick test.
-
sipa merged this on Feb 24, 2015
-
sipa closed this on Feb 24, 2015
-
sipa referenced this in commit 137a8ec45b on Feb 24, 2015
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-30 03:15 UTC
This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-30 03:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me