Details

    Description

      Remove page_id_t::m_fold. This was added as an optimization but my benchmark shows it actually slows things down. http://quick-bench.com/p9tQCIFqk2MJgBrK_vp80YD6r8Y

      Updated page_id_t will be consisted of a two uint32_t. It can be transferred in one register in 64 bit platforms. So, pass it by value everywhere.

      Attachments

        Issue Links

          Activity

            Looks OK, but I’d request some related additional cleanup.
            Also, I’d appreciate an example of the generated code for passing `page_id_t` by value on i386, amd64, aarch64. (I would like to confirm that it is only one 64-bit register or two 32-bit registers.)

            marko Marko Mäkelä added a comment - Looks OK, but I’d request some related additional cleanup. Also, I’d appreciate an example of the generated code for passing `page_id_t` by value on i386, amd64, aarch64. (I would like to confirm that it is only one 64-bit register or two 32-bit registers.)

            amd64: really passed in one `rdi` https://godbolt.org/z/YBAX0e

            i686: passed in a stack. And I don't know why https://godbolt.org/z/AZ3L9H

            aarch64: I don't know assembly. It looks like a struct was passed on a stack https://godbolt.org/z/q1ucnG

            kevg Eugene Kosov (Inactive) added a comment - amd64: really passed in one `rdi` https://godbolt.org/z/YBAX0e i686: passed in a stack. And I don't know why https://godbolt.org/z/AZ3L9H aarch64: I don't know assembly. It looks like a struct was passed on a stack https://godbolt.org/z/q1ucnG

            Cleanup done, PR updated.

            kevg Eugene Kosov (Inactive) added a comment - Cleanup done, PR updated.

            Thank you! I merged this along with some further cleanup.

            marko Marko Mäkelä added a comment - Thank you! I merged this along with some further cleanup.
            nikitamalyavin Nikita Malyavin added a comment - - edited

            kevg
            >aarch64: I don't know assembly. It looks like a struct was passed on a stack https://godbolt.org/z/q1ucnG

            Because it was 32-bit arm

            https://godbolt.org/z/GT9999Y5q

            nikitamalyavin Nikita Malyavin added a comment - - edited kevg >aarch64: I don't know assembly. It looks like a struct was passed on a stack https://godbolt.org/z/q1ucnG Because it was 32-bit arm https://godbolt.org/z/GT9999Y5q
            marko Marko Mäkelä added a comment - In 10.5, page_id_t was optimized further to be a wrapper of a single 64-bit integer , so that we can simplify comparisons.

            People

              kevg Eugene Kosov (Inactive)
              kevg Eugene Kosov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.