sharksforarms / deku

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

Add field magic support #503

Open wcampbell0x2a opened 2 weeks ago

wcampbell0x2a commented 2 weeks ago
github-actions[bot] commented 2 weeks ago

Benchmark for ae5d37f

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | count_from_u8_specialize | 96.1±0.89ns | 96.3±1.54ns | +0.21% | | count_no_specialize | 2.4±0.02µs | 2.4±0.03µs | 0.00% | | count_specialize | 97.6±2.59ns | 97.3±2.30ns | -0.31% | | deku_read_bits | 1200.3±8.91ns | **1176.5±21.89ns** | **-1.98%** | | deku_read_byte | 4.9±0.11ns | **4.5±0.08ns** | **-8.16%** | | deku_read_enum | 4.1±0.03ns | **3.8±0.07ns** | **-7.32%** | | deku_read_vec | 30.2±0.76ns | 30.7±0.84ns | +1.66% | | deku_write_bits | 190.6±7.57ns | 192.6±8.08ns | +1.05% | | deku_write_byte | 26.1±0.30ns | 26.1±0.51ns | 0.00% | | deku_write_enum | 23.9±0.22ns | 23.9±0.53ns | 0.00% | | deku_write_vec | 424.8±9.12ns | 428.3±8.14ns | +0.82% | | read_all | **4.4±0.13µs** | 5.0±0.04µs | **+13.64%** | | read_all_bytes | 4.9±0.03µs | **4.2±0.14µs** | **-14.29%** |
github-actions[bot] commented 6 days ago

Benchmark for 921c5b7

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | count_from_u8_specialize | 116.5±1.80ns | **91.7±0.91ns** | **-21.29%** | | count_no_specialize | **2.4±0.03µs** | 2.6±0.03µs | **+8.33%** | | count_specialize | 95.8±1.13ns | 96.3±1.24ns | +0.52% | | deku_read_bits | **1166.8±15.60ns** | 1186.8±18.32ns | **+1.71%** | | deku_read_byte | **4.2±0.04ns** | 4.7±0.09ns | **+11.90%** | | deku_read_enum | **3.6±0.04ns** | 4.7±0.07ns | **+30.56%** | | deku_read_vec | 30.1±0.20ns | 30.3±0.60ns | +0.66% | | deku_write_bits | 191.7±20.13ns | **183.9±6.50ns** | **-4.07%** | | deku_write_byte | 26.1±0.50ns | 26.3±1.71ns | +0.77% | | deku_write_enum | 23.9±0.31ns | 23.9±0.46ns | 0.00% | | deku_write_vec | 446.5±21.24ns | 448.0±7.43ns | +0.34% | | read_all | **4.9±0.04µs** | 5.0±0.04µs | **+2.04%** | | read_all_bytes | **5.0±0.07µs** | 5.2±0.24µs | **+4.00%** |
github-actions[bot] commented 6 days ago

Benchmark for f2e25c4

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | count_from_u8_specialize | 99.1±0.96ns | **94.0±1.01ns** | **-5.15%** | | count_no_specialize | 2.4±0.02µs | 2.4±0.03µs | 0.00% | | count_specialize | 104.6±1.19ns | **97.7±1.39ns** | **-6.60%** | | deku_read_bits | 1190.9±15.94ns | **1172.4±13.00ns** | **-1.55%** | | deku_read_byte | 4.2±0.08ns | 4.2±0.15ns | 0.00% | | deku_read_enum | 3.6±0.06ns | **3.2±0.03ns** | **-11.11%** | | deku_read_vec | 30.1±0.46ns | 30.3±1.77ns | +0.66% | | deku_write_bits | **182.7±3.98ns** | 188.7±11.22ns | **+3.28%** | | deku_write_byte | 26.1±0.45ns | 26.1±0.50ns | 0.00% | | deku_write_enum | 23.9±0.32ns | 23.9±0.37ns | 0.00% | | deku_write_vec | **434.0±6.25ns** | 445.1±8.16ns | **+2.56%** | | read_all | 5.0±0.07µs | **4.2±0.04µs** | **-16.00%** | | read_all_bytes | 5.0±0.03µs | **4.2±0.08µs** | **-16.00%** |