You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some thoughts for version 2 of the Decimal library. Issue numbers will be added as they are created.
Define updated rust minimum version.
Remove deprecated functions/features.
Disable all features by default - make opt in. std is only required by default IF it is required.
Review API design. It is a little inconsistent in places - it'd be nice to make this more consistent and extensible. Some guidelines for API design may be useful. Related to Review error handling within Decimal #49.
Investigate u128 optimizations when performing 96 bit operations. The hypothesis is that I can squeeze further performance from more complex numbers. Related to i128/u128 based implementation #135.
Investigate configurable precision decimals, perhaps leveraging constant generics. Reduced precision is easy, however greater precision is an interesting challenge since current optimizations won't hold true. This requires some experimentation to figure out if anything makes sense within this library or whether it's a variation. Related to i128/u128 based implementation #135 and Plans for const generics? #310.
Remove From support for Decimal. Decimal::from((u128|i128)::MAX) panics at runtime, TryFrom looks like the only reasonable approach. (excerpt: "Note: This trait must not fail. The From trait is intended for perfect conversions. If the conversion can fail or is not perfect, use TryFrom").
"Strict" mode. This will allow for explicit underflow handling (e.g. return an error instead of rounding).
The text was updated successfully, but these errors were encountered:
Lazily evaluated rational numbers? i.e. maintain precision until absolutely necessary. Could be a different type using decimal as a subset.
Const generics - should this be the underlying type (e.g. u32 vs u64 vs u128) or the size of the words (e.g. 4, 8, 16 etc).
Some thoughts for version 2 of the Decimal library. Issue numbers will be added as they are created.
deprecated
functions/features.std
is only required by default IF it is required.u128
optimizations when performing 96 bit operations. The hypothesis is that I can squeeze further performance from more complex numbers. Related to i128/u128 based implementation #135.From
support forDecimal
. Decimal::from((u128|i128)::MAX) panics at runtime,TryFrom
looks like the only reasonable approach. (excerpt: "Note: This trait must not fail. The From trait is intended for perfect conversions. If the conversion can fail or is not perfect, use TryFrom").The text was updated successfully, but these errors were encountered: