num-traits icon indicating copy to clipboard operation
num-traits copied to clipboard

Make `float::Float::integer_decode` DRY

Open mtilda opened this issue 1 year ago • 0 comments

Blocked by #327

Motivation

The trait method float::Float::integer_decode invokes one of the functions integer_decode_f32 or integer_decode_f64 depending on the implementation. These functions share a lot of code, so I would like to refactor them to use the same underlying source.

Considerations

  • Since this is lower-level bit-shifting code, I should take care not to damage performance. Critiques about performance optimization are extremely welcome.
  • To avoid causing breaking changes, I proposed wrote unit tests to this method in #327.

Status

This is a work in progress, as indicated by the fact that it is a Draft PR. Comments and suggestions are welcome, but not expected.

mtilda avatar Jun 27 '24 01:06 mtilda