Skip to content

Conversation

SakiTakamachi
Copy link
Member

No description provided.

@SakiTakamachi SakiTakamachi force-pushed the refacter_pdo_firebird branch 2 times, most recently from a562f49 to 0e5fd50 Compare April 28, 2024 23:29
@SakiTakamachi SakiTakamachi changed the title Refacter pdo firebird pdo_firebird: use EXPECTED and UNEXPECTED Apr 28, 2024
@SakiTakamachi
Copy link
Member Author

I decided not to include the change of if statement to switch in this PR.

@SakiTakamachi SakiTakamachi force-pushed the refacter_pdo_firebird branch from 0e5fd50 to ddb5572 Compare April 28, 2024 23:31
@SakiTakamachi SakiTakamachi changed the title pdo_firebird: use EXPECTED and UNEXPECTED pdo_firebird: use UNEXPECTED Apr 28, 2024
@SakiTakamachi SakiTakamachi marked this pull request as ready for review April 29, 2024 00:11
case IS_NULL:
/* complain if this field doesn't allow NULL values */
if (~var->sqltype & 1) {
if (UNEXPECTED(~var->sqltype & 1)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Globally looks correct to me, maybe this one (and the one above) kind of look a bit much. Not sure if there is a real gain but that s nitpicking :)

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LCTM, not sure the nested ones are that useful but don't think it harms.

@SakiTakamachi
Copy link
Member Author

Maybe I'll cut down on the changes quite a bit.

When refactoring BCMath, I noticed that there were many places where using UNEXPECTED actually made the code slower. The usage is correct and may have hindered compiler optimizations.

@SakiTakamachi
Copy link
Member Author

After measuring properly and identifying the areas that are effective, I will open the PR again.

@SakiTakamachi SakiTakamachi deleted the refacter_pdo_firebird branch June 13, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants