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

optimize lock_rec_find_set_bit() function

Details

    Description

      MySQL's bug #11745929 fix contains lock_rec_find_set_bit() function optimization:

      Author: Jakub Łopuszański <jakub.lopuszanski@oracle.com>
      Date:   Mon Jan 31 17:36:48 2022 +0100
       
          Bug #11745929 CHANGE LOCK PRIORITY SO THAT THE TRANSACTION HOLDING S-LOCK GETS X-LOCK F
      ...
          - `lock_rec_find_set_bit` which searches for the first bit set in a bitmap used bit-by-bit loop. Now it uses 13x times faster implementation which tries to skip 64,then 32,16, or 8 bits at a time. This is important for WAITING locks which have just a single bit set, in a bitmap with number of bits equal to the number of records on a page (which can be ~500).
      ...
      

      Port the optimization in MariaDB Server. MariaDB version of InnoDB contains nlz() function, and run-time code contains my_find_first_bit(), which can also be used to optimize the function. See this comment for details.

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

              vlad.lesin Vladislav Lesin
              vlad.lesin Vladislav Lesin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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