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

Cache NumberTextStyle character attributes and translations #103

Closed
oscbyspro opened this issue May 26, 2022 · 3 comments
Closed

Cache NumberTextStyle character attributes and translations #103

oscbyspro opened this issue May 26, 2022 · 3 comments
Labels
brrr such code, much quality
Milestone

Comments

@oscbyspro
Copy link
Owner

oscbyspro commented May 26, 2022

Attributes are constant and can be cached.

@oscbyspro oscbyspro added the brrr such code, much quality label May 26, 2022
@oscbyspro
Copy link
Owner Author

oscbyspro commented May 26, 2022

I think the same can be said for the translation.

@oscbyspro
Copy link
Owner Author

oscbyspro commented May 26, 2022

Proposed solution in a847994

Reader was reworked as a container of:

Components: Sign, Digit, Separator <-> Character
Attributes: Character -> Attribute
Translator: Character -> Character === ASCII, localized -> localized

where Components is Lexicon renamed.

@oscbyspro
Copy link
Owner Author

oscbyspro commented May 26, 2022

There should be like a gazillion fewer [:] lookups in v4.2.0.

@oscbyspro oscbyspro added this to the v4.2.0 milestone May 27, 2022
@oscbyspro oscbyspro changed the title Cache NumberTextStyle character attributes? Cache NumberTextStyle character attributes and translations May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brrr such code, much quality
Projects
None yet
Development

No branches or pull requests

1 participant