Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-41319

Remove the AVX512DQ requirement from crc32c_x86.cc

    XMLWordPrintable

Details

    • Not for Release Notes
    • The AVX512 implementation of CRC-32 was aligned between clang and other compilers to avoid using AVX512DQ instructions.

    Description

        1. Summary

      `AVX512DQ` is not needed in this case because `AVX512VL` and `AVX512F` generate the same assembly code: https://godbolt.org/z/15M4ds9x5

      I found this while running benchmarks in my [Python library](https://github.com/lava-sh/crc32c-rs); on [my hardware](https://github.com/lava-sh/crc32c-rs/tree/main/benchmarks/python#system-information), the MariaDB CRC32C version was faster for the following sizes: `1..48 B`, `256 B..2 KiB`, `4 KiB..16 KiB`; yes, I know that performance depends heavily on the CPU, and each CPU will have its own potentially fastest implementation (info from this repo: https://github.com/corsix/fast-crc32)

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              chirizxc chiri
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 2.5h
                  2.5h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.