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/6152~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/6152
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Dec 13, 2025

  1. Optimization of the is_normalized() function.

    Currently, a perfect hash is used to store knowledge about the code point.
    I suggest abandoning the use of perfect hash and storing code point data in
    bits packed into uint8. This will give us almost direct access to the data.
    
    The essence is simple.
    1. Take the code point and divide it by 8. This gives us the index in the
       uint8 table.
    2. We need to get the bit for the code point. Take the code point modulo
       8 to get the desired offset.
    
    Since we need to store one of three values (YES, NO, MAYBE) for each code point,
    we are forced to use two bits. So everything is simply multiplied by 2.
    
    This is how obtaining a value by code point looks like in code:
    
    uc = ch * 2;
    index = uc / 8;
    bit = uc % 8;
    
    found = UnicodeNormProps_NFC_QC[index];
    found >>= bit;
    found &= ~(PG_UINT8_MAX << 2);
    lexborisov authored and Commitfest Bot committed Dec 13, 2025
    Configuration menu
    Copy the full SHA
    893fc3d View commit details
    Browse the repository at this point in the history
  2. [CF 6152] v2 - Optimization of the is_normalized() function.

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/6152
    
    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/64841180-99bf-452f-af11-2c62db22ca78@gmail.com
    Author(s): Alexander Borisov
    Commitfest Bot committed Dec 13, 2025
    Configuration menu
    Copy the full SHA
    5b4bf5f View commit details
    Browse the repository at this point in the history
Loading