Skip to content

Refactor size class calculation for larger sizes.#315

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_941786532
Jul 8, 2026
Merged

Refactor size class calculation for larger sizes.#315
copybara-service[bot] merged 1 commit into
masterfrom
test_941786532

Conversation

@copybara-service

Copy link
Copy Markdown

Refactor size class calculation for larger sizes.

Combines the addition of the base index (120) into the numerator before the right shift, making the calculation slightly more compact. The mathematical result is unchanged.

Savings on x86:

  1. 1 instruction
  2. 2 byte.
  3. 1 cycle for large allocs.

Combines the addition of the base index (120) into the numerator before the right shift, making the calculation slightly more compact. The mathematical result is unchanged.

[Savings](https://godbolt.org/z/nGj68h8Kv) on x86:
1. 1 instruction
2. 2 byte.
3. 1 cycle for large allocs.

PiperOrigin-RevId: 944464841
@copybara-service copybara-service Bot merged commit 2d188d3 into master Jul 8, 2026
@copybara-service copybara-service Bot deleted the test_941786532 branch July 8, 2026 13:27
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.

1 participant