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

Datagen: move HashSet to the trait and other small cleanups #4473

Merged
merged 4 commits into from
Dec 21, 2023

Conversation

sffc
Copy link
Member

@sffc sffc commented Dec 19, 2023

Just some more things I had on my branch. No appreciable impact on performance (54.17, 58.70, 52.65).

Comment on lines +36 to 39
impl IterableDataProvider<$marker> for crate::DatagenProvider {
fn supported_locales(&self) -> Result<Vec<DataLocale>, DataError> {
Ok(vec![DataLocale::default()])
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I left the trivial impls directly with IterableDataProvider in the previous PR but accidentally migrated this trivial impl.

Comment on lines -75 to +77
fn supported_locales(&self) -> Result<Vec<DataLocale>, DataError> {
fn supported_locales_for_numbers(&self) -> Result<HashSet<DataLocale>, DataError> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This poorly named function has been around for a long time and I hope it didn't cause confusion. It dates to the time when each transformer was implemented on its own struct.

@robertbastian
Copy link
Member

while you're in here please put the performance improvements in the changelog

@sffc
Copy link
Member Author

sffc commented Dec 21, 2023

Changelog in #4484

@sffc sffc merged commit 7b6186b into unicode-org:main Dec 21, 2023
29 checks passed
@sffc sffc deleted the hashset-trait branch December 21, 2023 19:05
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.

3 participants