sharksforarms / deku

Declarative binary reading and writing: bit-level, symmetric, serialization/deserialization
Apache License 2.0
1.05k stars 54 forks source link

Draft: Improve DekuUpdate #415

Open wcampbell0x2a opened 5 months ago

wcampbell0x2a commented 5 months ago

This is more a bike-shed on what these attributes should be named, and initial impl.

See #409, #369

github-actions[bot] commented 5 months ago

Benchmark for e64a9e4

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1182.9±16.00ns** | 1265.0±14.41ns | **+6.94%** | | deku_read_byte | 20.2±0.11ns | 20.2±0.29ns | 0.00% | | deku_read_enum | 9.4±0.04ns | **9.3±0.11ns** | **-1.06%** | | deku_read_vec | 53.9±0.59ns | **53.2±0.67ns** | **-1.30%** | | deku_write_bits | 110.1±2.30ns | 109.7±0.97ns | -0.36% | | deku_write_byte | 129.5±3.29ns | **124.4±3.86ns** | **-3.94%** | | deku_write_enum | 97.9±2.74ns | **90.7±4.39ns** | **-7.35%** | | deku_write_vec | 3.1±0.04µs | 3.1±0.05µs | 0.00% |