sharksforarms / deku

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

Seek first bytes lengths before seek bits for __deku_input #502

Closed wcampbell0x2a closed 2 weeks ago

wcampbell0x2a commented 2 weeks ago

Closes #500

github-actions[bot] commented 2 weeks ago

Benchmark for 78ed86b

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | count_from_u8_specialize | 94.1±1.10ns | **91.6±1.03ns** | **-2.66%** | | count_no_specialize | 2.7±0.02µs | **2.4±0.02µs** | **-11.11%** | | count_specialize | 103.7±1.63ns | **100.9±1.30ns** | **-2.70%** | | deku_read_bits | 1183.8±17.13ns | 1187.4±20.18ns | +0.30% | | deku_read_byte | 4.5±0.05ns | **4.2±0.05ns** | **-6.67%** | | deku_read_enum | 3.8±0.06ns | **3.6±0.07ns** | **-5.26%** | | deku_read_vec | 30.2±0.73ns | 30.3±1.27ns | +0.33% | | deku_write_bits | 186.9±6.34ns | 183.1±6.44ns | -2.03% | | deku_write_byte | 26.3±1.37ns | 26.1±0.48ns | -0.76% | | deku_write_enum | 23.8±0.14ns | 23.9±0.23ns | +0.42% | | deku_write_vec | 452.7±7.42ns | **433.7±7.10ns** | **-4.20%** | | read_all | 5.0±0.04µs | 5.0±0.04µs | 0.00% | | read_all_bytes | **4.2±0.05µs** | 5.0±0.08µs | **+19.05%** |
github-actions[bot] commented 2 weeks ago

Benchmark for ba10dc8

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | count_from_u8_specialize | 98.2±1.28ns | **97.0±0.87ns** | **-1.22%** | | count_no_specialize | 2.7±0.03µs | **2.4±0.03µs** | **-11.11%** | | count_specialize | 97.8±1.63ns | **95.2±1.25ns** | **-2.66%** | | deku_read_bits | 1189.0±16.66ns | 1195.0±14.52ns | +0.50% | | deku_read_byte | 4.5±0.05ns | **4.1±0.11ns** | **-8.89%** | | deku_read_enum | 3.8±0.07ns | **3.3±0.09ns** | **-13.16%** | | deku_read_vec | 30.2±0.69ns | 30.5±0.46ns | +0.99% | | deku_write_bits | **195.9±6.15ns** | 206.6±5.17ns | **+5.46%** | | deku_write_byte | 26.1±0.34ns | 26.1±0.55ns | 0.00% | | deku_write_enum | 24.0±0.97ns | 24.0±0.73ns | 0.00% | | deku_write_vec | **423.6±7.28ns** | 440.4±8.71ns | **+3.97%** | | read_all | 5.0±0.04µs | **4.2±0.06µs** | **-16.00%** | | read_all_bytes | **4.2±0.06µs** | 4.3±0.23µs | **+2.38%** |
github-actions[bot] commented 2 weeks ago

Benchmark for 6d8d88a

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | count_from_u8_specialize | **95.9±0.89ns** | 97.8±1.36ns | **+1.98%** | | count_no_specialize | 2.6±0.02µs | **2.4±0.04µs** | **-7.69%** | | count_specialize | 101.9±1.17ns | **94.4±1.16ns** | **-7.36%** | | deku_read_bits | **1185.7±18.02ns** | 1204.2±12.96ns | **+1.56%** | | deku_read_byte | 4.5±0.02ns | **4.2±0.06ns** | **-6.67%** | | deku_read_enum | 3.8±0.05ns | **3.6±0.04ns** | **-5.26%** | | deku_read_vec | 30.3±1.65ns | 30.5±0.60ns | +0.66% | | deku_write_bits | 194.1±14.89ns | 191.2±8.14ns | -1.49% | | deku_write_byte | 26.1±0.43ns | 26.0±0.19ns | -0.38% | | deku_write_enum | 23.9±0.34ns | 23.9±0.40ns | 0.00% | | deku_write_vec | **425.0±7.46ns** | 441.7±7.97ns | **+3.93%** | | read_all | 5.0±0.06µs | 5.0±0.05µs | 0.00% | | read_all_bytes | **4.2±0.08µs** | 5.1±0.15µs | **+21.43%** |