-
Notifications
You must be signed in to change notification settings - Fork 174
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
add favor-script variant of likely subtags algorithm #4752
Conversation
Would working on FFI bindings be better as a separate PR, or should it be part of this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It saves work later if you do FFI in the same PR. If you're just adding a function, the FFI should be very straightforward. You can do the FFI once the Rust API is finalized. |
I was reviewing #4752 and I realized that there's a lot of duplicate code that can be extracted to a helper function, similar to what we do in the `maximize` routine. It appears to make the code slightly faster, too, which wasn't my primary goal but is a nice side-effect. ``` likelysubtags/minimize time: [3.8777 µs 3.9019 µs 3.9297 µs] change: [-6.9850% -6.0393% -5.0788%] (p = 0.00 < 0.05) Performance has improved. Found 5 outliers among 100 measurements (5.00%) 3 (3.00%) high mild 2 (2.00%) high severe ```
d8092b1
to
3133bfd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run the minimize benchmark to see if there's any performance difference across this PR?
|
make `minimize_favor_script` doc formatting consistent with `minimize`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! One more request: please add this to CHANGELOG.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
fixes #3859
Description of changes:
LocaleExpander::minimize_favor_script
.LocaleExpander::minimize
andLocaleExpander::minimize_favor_script
.