Skip to content

Improve Extraction of Power and SI Prefix from CLDR Units String & implement strip_prefix for zerotrie #4369

Open
@younies

Description

@younies

This issue pertains to the get_power and get_si_prefix functions in the MeasureUnit struct in the experimental/unitsconversion/src/measureunit.rs file. These functions are responsible for extracting the power and SI prefix from a CLDR units string, respectively.

Right now, we are using just a bunch of if and else statements. Which is not the most efficient way.

Option 1:

  • Use zerotrie and store it. Because it will be used while extracting the measurementunit from cldr-id

Aslo, implement strip_prefix in zerotrie

Metadata

Metadata

Assignees

Labels

A-performanceArea: Performance (CPU, Memory)C-numbersComponent: Numbers, units, currencies

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions