issues
search
sharksforarms
/
deku
Declarative binary reading and writing: bit-level, symmetric, serialization/deserialization
Apache License 2.0
1.05k
stars
54
forks
source link
Support arbitrary enum discriminant
#452
Open
wcampbell0x2a
opened
2 weeks ago
wcampbell0x2a
commented
2 weeks ago
Add support for arbitrary enum discriminant
Remove support for defining both
id = 1
and having a discriminant
Made DekuRead/DekuWrite Id const if possible
Closes #306
github-actions[bot]
commented
2 weeks ago
Benchmark for 9d3ece1
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1258.8±9.31ns | **1223.8±24.98ns** | **-2.78%** | | deku_read_byte | **3.3±0.09ns** | 3.5±0.06ns | **+6.06%** | | deku_read_enum | **2.5±0.07ns** | 2.7±0.06ns | **+8.00%** | | deku_read_vec | **33.3±0.35ns** | 33.8±0.23ns | **+1.50%** | | deku_write_bits | 167.0±6.57ns | 168.0±3.12ns | +0.60% | | deku_write_byte | 22.9±0.50ns | 22.7±0.37ns | -0.87% | | deku_write_enum | 21.4±0.30ns | **21.1±0.21ns** | **-1.40%** | | deku_write_vec | 402.4±3.79ns | **387.4±4.37ns** | **-3.73%** |
id = 1
and having a discriminantCloses #306