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

Migrate Variants to ShortVec and improve macro #1800

Closed
sffc opened this issue Apr 13, 2022 · 1 comment · Fixed by #2065
Closed

Migrate Variants to ShortVec and improve macro #1800

sffc opened this issue Apr 13, 2022 · 1 comment · Fixed by #2065
Labels
C-locale Component: Locale identifiers, BCP47 good first issue Good for newcomers help wanted Issue needs an assignee S-medium Size: Less than a week (larger bug fix or enhancement) T-enhancement Type: Nice-to-have but not required

Comments

@sffc
Copy link
Member

sffc commented Apr 13, 2022

In #1767 I introduced the concept of ShortVec in Locale, but only for Keywords and Fields.

If we extend the use of ShortVec to other places in Locale that currently use Vec, then we will be able to enable code such as:

locale!("en-US-u-ca-buddhist")
langid!("es-CA-valencia")

and basically any other situation where there is exactly 0 or 1 of everything. It also helps to reduce heap allocations.

@sffc sffc added T-enhancement Type: Nice-to-have but not required good first issue Good for newcomers help wanted Issue needs an assignee C-locale Component: Locale identifiers, BCP47 S-medium Size: Less than a week (larger bug fix or enhancement) labels Apr 13, 2022
@sffc
Copy link
Member Author

sffc commented May 11, 2022

@yzhang1994 is interested in this.

@sffc sffc added this to the ICU4X 1.1 milestone May 26, 2022
@sffc sffc changed the title Migrate more of Locale to ShortVec and improve macro Migrate Variants to ShortVec and improve macro Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-locale Component: Locale identifiers, BCP47 good first issue Good for newcomers help wanted Issue needs an assignee S-medium Size: Less than a week (larger bug fix or enhancement) T-enhancement Type: Nice-to-have but not required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant