sharksforarms / deku

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

Fix std::result::Result path in deku-derive #331

Closed wcampbell0x2a closed 1 year ago

wcampbell0x2a commented 1 year ago

Use std::result::Result in all derived quotes in deku-derive{read/write}.

Closes #310

github-actions[bot] commented 1 year ago

Benchmark for ef38321

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 838.4±7.39ns | 841.7±4.73ns | +0.39% | | deku_read_byte | **23.9±0.27ns** | 24.3±1.28ns | **+1.67%** | | deku_read_enum | 42.9±0.41ns | 42.6±0.42ns | -0.70% | | deku_read_vec | 2.1±0.02µs | 2.1±0.01µs | 0.00% | | deku_read_vec_perf | 1939.5±18.88ns | 1940.7±15.69ns | +0.06% | | deku_write_bits | 156.7±1.43ns | 157.6±1.45ns | +0.57% | | deku_write_byte | **91.3±0.89ns** | 91.9±0.49ns | **+0.66%** | | deku_write_enum | 156.5±0.77ns | 156.5±0.56ns | 0.00% | | deku_write_vec | 7.2±0.02µs | 7.2±0.01µs | 0.00% | | deku_write_vec_perf | 7.2±0.05µs | **7.0±0.03µs** | **-2.78%** |
github-actions[bot] commented 1 year ago

Benchmark for 803cb1e

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 976.9±40.82ns | 969.8±42.48ns | -0.73% | | deku_read_byte | 24.8±0.98ns | 24.8±0.85ns | 0.00% | | deku_read_enum | 43.3±1.87ns | 43.3±2.89ns | 0.00% | | deku_read_vec | 2.0±0.07µs | 2.0±0.13µs | 0.00% | | deku_read_vec_perf | 1981.4±87.13ns | 1943.2±128.82ns | -1.93% | | deku_write_bits | 166.3±7.98ns | 165.8±6.03ns | -0.30% | | deku_write_byte | 97.8±3.96ns | 97.4±4.29ns | -0.41% | | deku_write_enum | 157.9±4.95ns | 158.8±5.65ns | +0.57% | | deku_write_vec | 7.0±0.37µs | 7.0±0.22µs | 0.00% | | deku_write_vec_perf | 7.2±0.30µs | 7.0±0.41µs | -2.78% |