• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

unicode-org / icu4x / 10289694078

07 Aug 2024 06:24PM UTC coverage: 75.076% (-0.02%) from 75.094%
10289694078

push

github

web-flow
Use `LikelySubtagsForLanguageV1` for fallback (#5338)

`LikelySubtagsForLanguageV1` is almost identical to
`LocaleFallbackLikelySubtagsV1`, the differences being:
* `LikelySubtagsForLanguageV1` contains a `und` field, which is not
needed for fallback
* `LocaleFallbackLikelySubtagsV1` uses `ZeroMap2d`s, whereas
`LikelySubtagsForLanguageV1` uses `ZeroMap`s with tuple keys. Fallback
always looks up by both keys at the same time, so the `ZeroMap2d`
overhead is unnecessary.
* `LocaleFallbackLikelySubtagsV1` omits Language->Script entries where
the script is `Latn`. While this might save a few bytes, I'm not sure
that it's correct, as fallback for unknown languages will assume that
they are Latin and strip the `Latn` subtag during normalisation.

The `ZeroMap2d` overhead seems to cancel out the `und` field and `Latn`
optimisation, and `LikelySubtagsForLanguageV1` is only two bytes bigger
than `LocaleFallbackLikelySubtagsV1` (2230B vs 2228B).

26 of 31 new or added lines in 2 files covered. (83.87%)

6 existing lines in 5 files now uncovered.

54156 of 72135 relevant lines covered (75.08%)

564239.98 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.27
/provider/core/src/any.rs


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc