Giter VIP home page Giter VIP logo

crc32csum's Introduction

crc32csum

A simple utility for calculating crc32c from pipe or files using arm64 or x86 instructions.

Disclaimer

● x86 and software implementation code's author: Mark Adler(https://github.com/madler/brotli/blob/master/crc32c.c)

Compiling

● x86

gcc -msse4.2 -Wall -O3 -o crc32csum crc32csum.c

● arm64

gcc -march=armv8-a+crc+crypto -Wall -O3 -o crc32csum crc32csum.c

Benchmarks

1 GiB file from /dev/urandom was placed under tmpfs ramdisk before each runs.

x86: Intel Core i7-8550U

arm64: OnePlus 7 Pro (Snapdragon 855)

crc32 utility was from libarchive-zip-perl.

● x86

Utility Version Speed
crc32csum N/A 6059.17 MiB/s
crc32 1.60-1 1088.20 MiB/s
xxh128sum 0.7.3 6606.45 MiB/s
xxh64sum 0.7.3 5953.49 MiB/s
xxh32sum 0.7.3 4338.98 MiB/s
md5sum 8.28 655.15 MiB/s
sha1sum 8.28 586.82 MiB/s
sha256sum 8.28 227.86 MiB/s
sha512sum 8.28 372.09 MiB/s

● arm64

Utility Version Speed
crc32csum N/A 2892.66 MiB/s
crc32 1.60-1 605.56 MiB/s
xxh128sum 0.7.3 2645.99 MiB/s
xxh64sum 0.7.3 1812.39 MiB/s
xxh32sum 0.7.3 2221.26 MiB/s
md5sum 8.28 395.98 MiB/s
sha1sum 8.28 417.11 MiB/s
sha256sum 8.28 237.42 MiB/s
sha512sum 8.28 320.40 MiB/s

Enjoy!

crc32csum's People

Contributors

arter97 avatar madler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

stallion5632

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.