Skip to content

Conversation

@PastaPastaPasta
Copy link
Member

@PastaPastaPasta PastaPastaPasta commented Feb 15, 2022

This is an incredibly valuable enhancement for arm processors that support these intrinsics. On my apple M1 machine, this branch syncs the first 600000 blocks on testnet in 17 minutes and 05.95 seconds (1026s). Develop takes 19:48.12 (1188s). ~13.6% faster

@PastaPastaPasta PastaPastaPasta self-assigned this Feb 15, 2022
@PastaPastaPasta PastaPastaPasta added this to the 18 milestone Feb 15, 2022
aaa1d03 Add optimized sha256d64_arm_shani::Transform_2way (Pieter Wuille)
fe06298 Implement sha256_arm_shani::Transform (Pavol Rusnak)
48a72fa Add sha256_arm_shani to build system (Pavol Rusnak)
c2b7934 Rename SHANI to X86_SHANI to allow future implementation of ARM_SHANI (Pavol Rusnak)

Pull request description:

  This PR adds support for ARMv8 SHA2 Intrinsics.

  Fixes bitcoin#13401 and bitcoin#17414

  * Integration part was done by me.
  * The original SHA2 NI code comes from https://github.com/noloader/SHA-Intrinsics/blob/master/sha256-arm.c
  * Minor optimizations from https://github.com/rollmeister/bitcoin-armv8/blob/master/src/crypto/sha256.cpp are applied too.
  * The 2-way transform added by @sipa

ACKs for top commit:
  laanwj:
    Code review and lightly tested ACK aaa1d03

Tree-SHA512: 9689d6390c004269cb1ee79ed05430d7d35a6efef2554a2b6732f7258a11e7e959b3306c04b4e8637a9623fb4c12d1c1b3592da0ff0dc6d737932db302509669

# Conflicts:
#	configure.ac
#	src/Makefile.am
#	src/crypto/sha256.cpp
@PastaPastaPasta PastaPastaPasta force-pushed the backport-24115-2 branch 2 times, most recently from 820f2cb to a7a3a93 Compare March 29, 2022 03:34
@PastaPastaPasta PastaPastaPasta marked this pull request as ready for review March 29, 2022 03:41
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@UdjinM6 UdjinM6 merged commit 96af8e1 into dashpay:develop Mar 29, 2022
@PastaPastaPasta PastaPastaPasta deleted the backport-24115-2 branch March 29, 2022 23:56
@UdjinM6 UdjinM6 mentioned this pull request Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants