Skip to content

Conversation

@copybara-service
Copy link

Add BTI to branch targets when branch protection is enabled. This resolves

#23306

Since there's a measurable performance cost (~12% for a long varint heavy message) on little and mid size cores, these instructions aren't unconditionally emitted even though they're compatible (CPUs lacking FEAT_BTI interpret them as HINT/NOP). Even with these extra instructions, the assembly path is still much faster than the generic one.

…olves

#23306

Since there's a measurable performance cost (~12% for a long varint heavy message) on little and mid size cores, these instructions aren't unconditionally emitted even though they're compatible (CPUs lacking FEAT_BTI interpret them as HINT/NOP). Even with these extra instructions, the assembly path is still much faster than the generic one.

PiperOrigin-RevId: 834093313
@copybara-service copybara-service bot merged commit a3ca522 into main Nov 19, 2025
@copybara-service copybara-service bot deleted the test_833628561 branch November 19, 2025 04:44
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.

2 participants