Skip to content

postfix(pag): Incorrect calculation of last used page when database contains only one PIP#8949

Merged
dyemanov merged 2 commits intoFirebirdSQL:masterfrom
TreeHunter9:master-last-used-page-postfix
Mar 24, 2026
Merged

postfix(pag): Incorrect calculation of last used page when database contains only one PIP#8949
dyemanov merged 2 commits intoFirebirdSQL:masterfrom
TreeHunter9:master-last-used-page-postfix

Conversation

@TreeHunter9
Copy link
Contributor

@TreeHunter9 TreeHunter9 commented Mar 23, 2026

Postfix after #8772.

@aafemt
Copy link
Contributor

aafemt commented Mar 23, 2026

Because this PR is for master and master has C++20 enabled, consider using std::countl_zero in the loop above.

@TreeHunter9
Copy link
Contributor Author

Because this PR is for master and master has C++20 enabled, consider using std::countl_zero in the loop above.

I don't like the idea of adding some changes that doesn't belong to initial patch intent, especially when it comes to postfix patches, besides, this patch should be backported to v5.

But the idea of using std::countl_zero is good overall, however, it seems that we won't see any difference in performance as it is not a "hot" function.

@dyemanov dyemanov merged commit 90c9db1 into FirebirdSQL:master Mar 24, 2026
23 checks passed
dyemanov pushed a commit that referenced this pull request Mar 24, 2026
…ins only one PIP (#8949)

Co-authored-by: Artyom Ivanov <artyom.ivanov@red-soft.ru>
@TreeHunter9 TreeHunter9 deleted the master-last-used-page-postfix branch March 24, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants