Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICU-22991 Reduce fStamp to 8 bits #3323

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FrankYFTang
Copy link
Contributor

@FrankYFTang FrankYFTang commented Dec 31, 2024

Reduce 24x3=72 bytes per Calendar object by changing from 32 bits integer to 8 bits integer for the stamp array.
Reset the fNextStamp whenever we clear the fStamp. There are at most 24 different stamp values stored inside fStamp so using 7 bits to store up to 127 different one should be enough.

Checklist

  • Required: Issue filed: ICU-22991
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

@FrankYFTang FrankYFTang force-pushed the ICU-22991-reduceStamp branch from 2673453 to e087df3 Compare December 31, 2024 05:16
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • icu4c/source/i18n/calendar.cpp is different
  • icu4j/main/core/src/main/java/com/ibm/icu/util/Calendar.java is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@FrankYFTang FrankYFTang force-pushed the ICU-22991-reduceStamp branch from e087df3 to 98b06dd Compare December 31, 2024 05:41
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • icu4c/source/i18n/calendar.cpp is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

Reduce 24x3=72 bytes per Calendar object by changing
from 32 bits integer to 8 bits integer for the stamp array.
Reset the fNextStamp inside the clear function.

fix
@FrankYFTang FrankYFTang force-pushed the ICU-22991-reduceStamp branch from 98b06dd to b31ce36 Compare December 31, 2024 05:45
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • icu4j/main/core/src/main/java/com/ibm/icu/util/Calendar.java is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

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