issues
search
sharksforarms
/
deku
Declarative binary reading and writing: bit-level, symmetric, serialization/deserialization
Apache License 2.0
1.14k
stars
55
forks
source link
Mark auto derived functions
#495
Closed
wcampbell0x2a
closed
3 weeks ago
wcampbell0x2a
commented
3 weeks ago
Add automatically_derived to all impl functions in deku-derive
Motivation:
https://github.com/rust-lang/rust/pull/120185
Closes #491
github-actions[bot]
commented
3 weeks ago
Benchmark for 4d7dbc9
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | count_from_u8_specialize | 94.7±2.04ns | **91.8±4.33ns** | **-3.06%** | | count_no_specialize | 2.4±0.02µs | 2.4±0.02µs | 0.00% | | count_specialize | 95.4±1.35ns | 94.9±1.49ns | -0.52% | | deku_read_bits | 1199.1±18.67ns | 1207.0±16.13ns | +0.66% | | deku_read_byte | **4.7±0.35ns** | 5.0±0.07ns | **+6.38%** | | deku_read_enum | **3.8±0.07ns** | 4.1±0.03ns | **+7.89%** | | deku_read_vec | 30.2±0.61ns | 30.1±0.19ns | -0.33% | | deku_write_bits | 188.7±6.15ns | 192.4±4.26ns | +1.96% | | deku_write_byte | 25.8±0.52ns | 25.8±0.56ns | 0.00% | | deku_write_enum | 24.0±0.96ns | 23.9±0.24ns | -0.42% | | deku_write_vec | 429.8±4.85ns | 425.2±22.08ns | -1.07% | | read_all | 4.9±0.03µs | **4.2±0.06µs** | **-14.29%** | | read_all_bytes | **4.2±0.06µs** | 4.8±0.05µs | **+14.29%** |
Closes #491