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

Implement fast path for ASCII range in strnxfrm_onelevel_internal()

Details

    Description

      During benchmarking, Axel revealed a bottleneck inside MY_FUNCTION_NAME(strnxfrm_onelevel_internal) in ctype-uca.ic.

      The problem is that calling my_uca_scanner_init_any() followed by a loop of MY_FUNCTION_NAME(scanner_next)() calls is costly.

      Under terms of this task we'll add a fast path for the ASCII range into this strnxfrm_onelevel_internal().

      • In the best scenario, when the input string is a pure ASCII, the execution will not even reach my_uca_scanner_init_any().
      • In a worse scenario, when there is an ASCII prefix followed by a non-ASCII suffix, the ASCII part will be processed faster.

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            bar Alexander Barkov made changes -
            Description During benchmarking, Axel revealed a bottleneck inside MY_FUNCTION_NAME(strnxfrm_onelevel_internal) in ctype-uca.ic.

            The problem is that calling my_uca_scanner_init_any() followed by a loop of MY_FUNCTION_NAME(scanner_next)() calls is costly.

            Under terms of this task we'll add a fast path for the ASCII range into this strnxfrm_onelevel_internal().
            - In the best scenario, when the input string is a pure ASCII, the execution will not even reach strnxfrm_onelevel_internal().
            - In a worse scenario, when there is an ASCII prefix followed by a non-ASCII suffix, the ASCII part will be processed faster.
            bar Alexander Barkov made changes -
            Description During benchmarking, Axel revealed a bottleneck inside MY_FUNCTION_NAME(strnxfrm_onelevel_internal) in ctype-uca.ic.

            The problem is that calling my_uca_scanner_init_any() followed by a loop of MY_FUNCTION_NAME(scanner_next)() calls is costly.

            Under terms of this task we'll add a fast path for the ASCII range into this strnxfrm_onelevel_internal().
            - In the best scenario, when the input string is a pure ASCII, the execution will not even reach strnxfrm_onelevel_internal().
            - In a worse scenario, when there is an ASCII prefix followed by a non-ASCII suffix, the ASCII part will be processed faster.
            During benchmarking, Axel revealed a bottleneck inside MY_FUNCTION_NAME(strnxfrm_onelevel_internal) in ctype-uca.ic.

            The problem is that calling my_uca_scanner_init_any() followed by a loop of MY_FUNCTION_NAME(scanner_next)() calls is costly.

            Under terms of this task we'll add a fast path for the ASCII range into this strnxfrm_onelevel_internal().
            - In the best scenario, when the input string is a pure ASCII, the execution will not even reach my_uca_scanner_init_any().
            - In a worse scenario, when there is an ASCII prefix followed by a non-ASCII suffix, the ASCII part will be processed faster.
            bar Alexander Barkov made changes -
            Fix Version/s 10.4.0 [ 23115 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 90229 ] MariaDB v4 [ 133728 ]

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.