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

ut_fold_ull() and ut_hash_ulint() are a waste

    XMLWordPrintable

Details

    Description

      On 64-bit CPU architectures, the default InnoDB data type ulint, which is an alias of size_t is 64 bits wide.

      The function ut_fold_ull() is converting a 64-bit integer to ulint. It can be simplified on 32-bit systems, and we could avoid the extra instructions altogether on 64-bit systems and just use the 64-bit index or table identifiers as is.

      The function ut_hash_ulint() seems to be an unnecessary obfuscation. Computing an exclusive OR with a constant before performing a modulus operation does not seem to affect the entropy at all.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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