Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5545~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5545
Choose a head ref
  • 3 commits
  • 11 files changed
  • 4 contributors

Commits on Apr 3, 2025

  1. Improve CRC32C performance on recent x86_64 platforms

    The previous implementation of CRC32C on x86 relied on the native
    CRC32 instruction from the SSE 4.2 extension, which operates on
    up to 8 bytes at a time. We can get a substantial speedup by using
    carryless multiplication on SIMD registers, processing 64 bytes per
    loop iteration. Shorter inputs fall back to ordinary CRC instructions.
    
    The VPCLMULQDQ instruction on 512-bit registers has been available
    on Intel hardware since 2019 and AMD since 2022. There is an older
    variant for 128-bit registers, but at least on Zen 2 it performs worse
    than normal CRC instructions for short inputs. (Thanks to David Rowley
    for testing on that platform.)
    
    We must now do a runtime check, even for builds that target SSE
    4.2. This doesn't matter in practice for WAL (arguably the most
    critical case), because since commit af0c248 the final computation
    with the 20-byte WAL header is inlined and unrolled. Compared with
    two direct function calls, testing showed equal or slightly faster
    performance in performing an indirect function call on several dozen
    bytes followed by inlined instructions on constant input of 20 bytes.
    
    The MIT-licensed implementation was generated with the "generate"
    program from
    
    https://github.com/corsix/fast-crc32/
    
    Based on: "Fast CRC Computation for Generic Polynomials Using PCLMULQDQ
    Instruction" V. Gopal, E. Ozturk, et al., 2009
    
    Co-authored-by: Raghuveer Devulapalli <[email protected]>
    Co-authored-by: Paul Amonson <[email protected]>
    Reviewed-by: Nathan Bossart <[email protected]>
    Reviewed-by: Andres Freund <[email protected]> (earlier version)
    Tested-by: Raghuveer Devulapalli <[email protected]>
    Tested-by: Matthew Sterrett <[email protected]> (earlier version)
    Discussion: https://postgr.es/m/BL1PR11MB530401FA7E9B1CA432CF9DC3DC192@BL1PR11MB5304.namprd11.prod.outlook.com
    Discussion: https://postgr.es/m/PH8PR11MB82869FF741DFA4E9A029FF13FBF72@PH8PR11MB8286.namprd11.prod.outlook.com
    3 people authored and Commitfest Bot committed Apr 3, 2025
    Configuration menu
    Copy the full SHA
    1517ef4 View commit details
    Browse the repository at this point in the history
  2. Add debug for CI XXX not for commit

    j-naylor authored and Commitfest Bot committed Apr 3, 2025
    Configuration menu
    Copy the full SHA
    27c7d66 View commit details
    Browse the repository at this point in the history
  3. [CF 5545] v16 - Improve CRC32C performance with AVX-512, take 2

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5545
    
    The branch will be overwritten each time a new patch version is posted to
    the thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Patch(es): https://www.postgresql.org/message-id/CANWCAZZ_+65KW3qUks2y15142zLYLfx0JK-wWWCJziDkR971Eg@mail.gmail.com
    Author(s): Raghuveer Devulapalli
    Commitfest Bot committed Apr 3, 2025
    Configuration menu
    Copy the full SHA
    c63c108 View commit details
    Browse the repository at this point in the history
Loading