-
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
Fix the case of "centi-meter" and "100-kilometer" #4418
Merged
Merged
Changes from 6 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
bd44037
Fix the case of "centi-meter" and "100-kilometer"
younies 4413060
Merge branch 'main' of github.com:unicode-org/icu4x into fix-extracti…
younies ddf1121
Merge branch 'main' of github.com:unicode-org/icu4x into fix-extracti…
younies 49e161d
fix after merge.
younies 1deb947
fix fmt
younies bec7a3c
Merge branch 'main' into fix-extracting-units
younies 7e57267
fix the cases of "centi-meter" and "100-kilometer"
younies 11f6d4f
Merge branch 'main' of github.com:unicode-org/icu4x into fix-extracti…
younies ef2444a
try to convert from from `&ZeroTrie<ZeroVec<'_, u8>>` to &ZeroTrieSim…
younies 2499082
Merge branch 'main' of github.com:unicode-org/icu4x into fix-extracti…
younies 69a9327
Use const TRIE for powers
younies 7e42334
Make constants TRIEs
younies 7eee337
silent the test
younies e46cc25
Use ZeroVec instead of Vec
Manishearth a975af3
Update experimental/unitsconversion/src/measureunit.rs
younies 28a750c
Merge branch 'main' of github.com:unicode-org/icu4x into fix-extracti…
younies 8eff0c7
Merge branch 'main' of github.com:unicode-org/icu4x into fix-extracti…
younies 4a3458a
Merge branch 'main' of github.com:unicode-org/icu4x into fix-extracti…
younies b4b1c72
add more test cases
younies 89a3a8d
fix fmt
younies 3c0c3f7
fix clippy
younies 14d9162
fix all the cases
younies 25fbd09
fix clippy
younies 07982db
fix clippy
younies e1e91a1
fix clippy
younies 2754835
fix fmt
younies 92577dc
add tests for the non parsable units
younies e9232c9
update bakkeddata
younies 61c9de3
cargo make download-repo-sources
younies 8e2a1e6
cargo make testdata
younies File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Use a
Cow
to avoid allocation in the general case.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.
The ZeroTrie cursor is available now so you should just use that.
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.
Great, I will do that right away.
In order to add the test cases, could you reply to this comment:
https://github.com/unicode-org/icu4x/pull/4422/files#r1419262946
I need to be able to read the provider.
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.
To use the ZeroTrie cursor, this means that we need to change the algorithm in getting the power and the si prefix.
Shall we do it in another PR and test the performance. who knows which implementation is better in performance ?
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.
You can't allocate memory in hot library code like this. We have clients who are sensitive to it. Also, we have a lot of experiential evidence that memory allocations are one of the biggest single contributors to slow code, so I have no doubt that ZeroTrieCursor will be faster.
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.
Okay, no problem. actually, I am implementing it right now.