sharksforarms / deku

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

Add support for specifying the id's endianness #476

Closed wcampbell0x2a closed 2 months ago

wcampbell0x2a commented 2 months ago

Rebased and recent https://github.com/sharksforarms/deku/pull/337

Closes #337

github-actions[bot] commented 2 months ago

Benchmark for 82c5749

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | count | 5.0±0.02µs | 5.0±0.01µs | 0.00% | | deku_read_bits | **1146.1±18.65ns** | 1201.7±19.64ns | **+4.85%** | | deku_read_byte | 3.3±0.15ns | 3.3±0.04ns | 0.00% | | deku_read_enum | 3.2±0.09ns | **3.1±0.01ns** | **-3.13%** | | deku_read_vec | 42.5±0.31ns | **42.2±0.22ns** | **-0.71%** | | deku_write_bits | **190.2±4.40ns** | 201.3±4.18ns | **+5.84%** | | deku_write_byte | 24.9±0.39ns | 24.9±0.32ns | 0.00% | | deku_write_enum | 23.5±0.51ns | 23.5±0.29ns | 0.00% | | deku_write_vec | 417.3±6.78ns | 412.6±6.48ns | -1.13% | | read_all | 5.5±0.02µs | 5.5±0.02µs | 0.00% | | read_all_bytes | 3.7±0.05µs | 3.7±0.07µs | 0.00% |
github-actions[bot] commented 2 months ago

Benchmark for a08f542

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | count | 5.0±0.02µs | 5.0±0.01µs | 0.00% | | deku_read_bits | **1147.1±17.33ns** | 1169.2±17.99ns | **+1.93%** | | deku_read_byte | 3.1±0.05ns | 3.1±0.04ns | 0.00% | | deku_read_enum | 3.1±0.03ns | 3.1±0.02ns | 0.00% | | deku_read_vec | 42.2±0.34ns | 42.2±0.33ns | 0.00% | | deku_write_bits | 194.0±3.89ns | 195.1±7.96ns | +0.57% | | deku_write_byte | 24.5±0.21ns | 24.5±0.63ns | 0.00% | | deku_write_enum | 23.0±0.33ns | 22.9±0.28ns | -0.43% | | deku_write_vec | 412.9±7.17ns | 412.7±5.90ns | -0.05% | | read_all | **3.7±0.06µs** | 5.5±0.03µs | **+48.65%** | | read_all_bytes | 5.4±0.02µs | **3.8±0.12µs** | **-29.63%** |
github-actions[bot] commented 2 months ago

Benchmark for fb2c47b

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | count | 5.0±0.01µs | 5.0±0.01µs | 0.00% | | deku_read_bits | 1144.7±18.40ns | 1144.7±16.65ns | 0.00% | | deku_read_byte | 3.1±0.04ns | 3.1±0.14ns | 0.00% | | deku_read_enum | 3.2±0.05ns | 3.2±0.02ns | 0.00% | | deku_read_vec | 42.2±0.38ns | 42.2±0.42ns | 0.00% | | deku_write_bits | 197.3±6.20ns | 202.1±6.53ns | +2.43% | | deku_write_byte | 24.4±0.46ns | 24.5±0.42ns | +0.41% | | deku_write_enum | 23.0±0.41ns | 23.0±0.39ns | 0.00% | | deku_write_vec | **432.0±7.19ns** | 447.5±18.26ns | **+3.59%** | | read_all | 5.5±0.03µs | 5.5±0.02µs | 0.00% | | read_all_bytes | 3.8±0.06µs | 3.8±0.06µs | 0.00% |
Barre commented 2 months ago

I just saw this, thank you @wcampbell0x2a