Skip to content

Refactor size class calculation for larger sizes.#315

Draft
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_941786532
Draft

Refactor size class calculation for larger sizes.#315
copybara-service[bot] wants to merge 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: 941786532
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