leveldb: Add ARMv8 CRC32C support #12968

pull laanwj wants to merge 2 commits into bitcoin:master from laanwj:2018_04_armv8_crc32c changing 10 files +172 −20
  1. laanwj commented at 5:38 PM on April 12, 2018: member

    Use the optional CRC32 instructions to accelerate leveldb's CRC32C computation on ARMv8 (32 and 64 bit). Uses a similar plan as the SSE42 instructions for x86.

    Needs testing. What I've tested:

    • Build system detection seems to work; only if the compiler supports the instructions and HWCAPx_CRC32 exists in the kernel headers, the specific compilation unit is built
    • Instruction set is successfully detected and used on Odroid-C2 AARCH64, CRC computations are correct
    • Instruction set is (correctly) not detected, and not used on Cubox/i.MX6 ARM32.

    Fails travis test only because: the new src/leveldb/* files should go to https://github.com/bitcoin-core/leveldb, most of the changes here are build system, though.

  2. leveldb: Add ARMv8 CRC32C support
    Use the optional CRC32 instructions to accelerate leveldb's
    CRC32C computation on ARMv8.
    c4588bcb65
  3. laanwj added the label UTXO Db and Indexes on Apr 12, 2018
  4. laanwj added the label Upstream on Apr 12, 2018
  5. squashme: namespacery a46249ce14
  6. laanwj commented at 5:08 AM on April 14, 2018: member

    Benchmarking just the CRC instructions vs a software implementation of CRC32C, I've found that usually it's about 6 times faster (if you want to try on your own platform see my crcbench):

    • Amlogic ARM Cortex-A53 1.5Ghz (Odroid-C2)
    [sw] 65543000 bytes in 139538us monotonic 138962us CPU (471.7MB/s) 3.3 cycles/b
    [hw-arm] 65543000 bytes in 22863us monotonic 22838us CPU (2869.9MB/s) 0.5 cycles/b
    
    • HiSilicon 620 processor: 8 ARM Cortex A53 cores, 1.2 ghz (Hikey)
    [sw] 65543000 bytes in 159145us monotonic 158469us CPU (413.6MB/s) 2.8 cycles/b
    [hw-arm] 65543000 bytes in 29079us monotonic 28981us CPU (2261.6MB/s) 0.5 cycles/b
    

    Will add i.MX8 results later.

  7. laanwj closed this on Apr 16, 2018

  8. laanwj commented at 6:47 AM on April 16, 2018: member
  9. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me