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
Add reader::read_bytes_const
#429
Closed
wcampbell0x2a
closed
6 months ago
wcampbell0x2a
commented
7 months ago
Reduce codegen for known sizes at compile time
DekuReader<_, Endian> for all types
DekuReader<_, (Endian, Endian)> for u8
github-actions[bot]
commented
7 months ago
Benchmark for 177f960
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1285.6±20.73ns | **1239.8±18.39ns** | **-3.56%** | | deku_read_byte | 5.5±0.09ns | **5.3±0.06ns** | **-3.64%** | | deku_read_enum | 2.8±0.07ns | **2.6±0.06ns** | **-7.14%** | | deku_read_vec | **35.2±0.57ns** | 36.3±0.48ns | **+3.12%** | | deku_write_bits | 183.3±2.78ns | **175.0±6.16ns** | **-4.53%** | | deku_write_byte | 22.5±0.19ns | **22.1±0.58ns** | **-1.78%** | | deku_write_enum | 20.9±0.49ns | **20.5±0.37ns** | **-1.91%** | | deku_write_vec | **283.2±4.84ns** | 294.6±30.34ns | **+4.03%** |
github-actions[bot]
commented
6 months ago
Benchmark for a5a46de
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1283.0±17.82ns | 1298.2±26.19ns | +1.18% | | deku_read_byte | **5.2±0.05ns** | 5.5±0.08ns | **+5.77%** | | deku_read_enum | **2.6±0.07ns** | 2.8±0.06ns | **+7.69%** | | deku_read_vec | **34.9±0.63ns** | 35.9±0.51ns | **+2.87%** | | deku_write_bits | 156.2±1.57ns | 156.0±3.28ns | -0.13% | | deku_write_byte | 22.3±1.34ns | 22.3±0.21ns | 0.00% | | deku_write_enum | 23.5±0.42ns | **20.8±0.35ns** | **-11.49%** | | deku_write_vec | **290.5±2.77ns** | 308.1±4.75ns | **+6.06%** |
github-actions[bot]
commented
6 months ago
Benchmark for a9e524e
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1220.7±71.69ns** | 1262.5±41.03ns | **+3.42%** | | deku_read_byte | 5.5±0.09ns | **5.3±0.13ns** | **-3.64%** | | deku_read_enum | 3.0±0.18ns | **2.5±0.06ns** | **-16.67%** | | deku_read_vec | **35.2±0.38ns** | 36.3±0.82ns | **+3.12%** | | deku_write_bits | 159.0±4.62ns | **149.2±2.30ns** | **-6.16%** | | deku_write_byte | 22.0±0.38ns | 22.0±0.24ns | 0.00% | | deku_write_enum | 23.6±0.62ns | **20.5±0.64ns** | **-13.14%** | | deku_write_vec | 306.2±13.48ns | 308.0±3.05ns | +0.59% |
wcampbell0x2a
commented
6 months ago
@sharksforarms should be ready now
github-actions[bot]
commented
6 months ago
Benchmark for 8a77f7c
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1174.6±11.51ns** | 1232.9±17.62ns | **+4.96%** | | deku_read_byte | **5.2±0.11ns** | 5.4±0.10ns | **+3.85%** | | deku_read_enum | 2.6±0.10ns | 2.6±0.04ns | 0.00% | | deku_read_vec | **35.0±0.70ns** | 36.2±0.28ns | **+3.43%** | | deku_write_bits | 157.3±2.53ns | **152.5±3.06ns** | **-3.05%** | | deku_write_byte | 22.0±0.19ns | 22.1±0.47ns | +0.45% | | deku_write_enum | 23.5±0.40ns | **20.5±0.19ns** | **-12.77%** | | deku_write_vec | **287.2±4.58ns** | 328.0±8.24ns | **+14.21%** |
github-actions[bot]
commented
6 months ago
Benchmark for e8911cd
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1278.3±16.77ns | **1249.5±12.39ns** | **-2.25%** | | deku_read_byte | 5.4±0.08ns | **3.4±0.09ns** | **-37.04%** | | deku_read_enum | 2.6±0.05ns | 2.6±0.05ns | 0.00% | | deku_read_vec | 36.6±0.60ns | **36.2±0.33ns** | **-1.09%** | | deku_write_bits | 168.4±4.06ns | **155.3±1.99ns** | **-7.78%** | | deku_write_byte | 22.1±0.70ns | 22.0±0.25ns | -0.45% | | deku_write_enum | 20.8±0.50ns | 20.5±0.37ns | -1.44% | | deku_write_vec | **287.8±4.65ns** | 329.5±4.85ns | **+14.49%** |
github-actions[bot]
commented
6 months ago
Benchmark for e3e8ddb
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1143.7±17.76ns** | 1260.8±19.44ns | **+10.24%** | | deku_read_byte | **5.4±0.17ns** | 5.5±0.06ns | **+1.85%** | | deku_read_enum | **2.6±0.05ns** | 2.9±0.04ns | **+11.54%** | | deku_read_vec | 36.5±0.64ns | **35.8±0.41ns** | **-1.92%** | | deku_write_bits | **152.9±3.67ns** | 156.7±8.08ns | **+2.49%** | | deku_write_byte | **22.0±0.37ns** | 24.5±6.27ns | **+11.36%** | | deku_write_enum | 20.9±1.08ns | 20.6±0.78ns | -1.44% | | deku_write_vec | **288.8±4.53ns** | 302.2±2.55ns | **+4.64%** |
github-actions[bot]
commented
6 months ago
Benchmark for 17a27ae
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1184.2±43.80ns** | 1267.8±14.83ns | **+7.06%** | | deku_read_byte | 5.4±0.04ns | **3.4±0.07ns** | **-37.04%** | | deku_read_enum | 2.6±0.06ns | 2.6±0.06ns | 0.00% | | deku_read_vec | 36.5±0.73ns | **36.0±0.47ns** | **-1.37%** | | deku_write_bits | **157.1±3.02ns** | 162.1±4.05ns | **+3.18%** | | deku_write_byte | 22.0±0.38ns | 22.1±0.43ns | +0.45% | | deku_write_enum | 20.8±0.31ns | **20.5±0.29ns** | **-1.44%** | | deku_write_vec | **286.7±4.33ns** | 291.7±7.54ns | **+1.74%** |
github-actions[bot]
commented
6 months ago
Benchmark for 0ef232d
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1308.9±15.97ns | **1229.0±16.00ns** | **-6.10%** | | deku_read_byte | 5.4±0.08ns | **3.3±0.07ns** | **-38.89%** | | deku_read_enum | 2.6±0.07ns | 2.6±0.06ns | 0.00% | | deku_read_vec | 33.9±0.50ns | 34.2±1.04ns | +0.88% | | deku_write_bits | 164.1±3.98ns | **149.9±2.85ns** | **-8.65%** | | deku_write_byte | 22.7±0.59ns | **21.9±0.44ns** | **-3.52%** | | deku_write_enum | 21.4±0.36ns | 21.5±0.57ns | +0.47% | | deku_write_vec | 426.0±5.52ns | **406.9±5.38ns** | **-4.48%** |
github-actions[bot]
commented
6 months ago
Benchmark for 5f9e387
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1277.5±20.54ns | 1262.0±36.71ns | -1.21% | | deku_read_byte | 5.5±0.09ns | **3.3±0.10ns** | **-40.00%** | | deku_read_enum | 3.0±0.07ns | **2.6±0.08ns** | **-13.33%** | | deku_read_vec | 33.9±0.49ns | 33.6±0.48ns | -0.88% | | deku_write_bits | 156.5±6.01ns | **150.0±3.65ns** | **-4.15%** | | deku_write_byte | 22.7±0.36ns | **21.6±0.56ns** | **-4.85%** | | deku_write_enum | 21.4±0.41ns | 21.2±0.69ns | -0.93% | | deku_write_vec | 385.4±5.43ns | **349.6±4.72ns** | **-9.29%** |
github-actions[bot]
commented
6 months ago
Benchmark for 0c6fbe2
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1275.9±21.93ns | **1234.1±18.05ns** | **-3.28%** | | deku_read_byte | 5.4±0.25ns | **3.3±0.09ns** | **-38.89%** | | deku_read_enum | 2.6±0.07ns | 2.6±0.05ns | 0.00% | | deku_read_vec | 33.9±0.42ns | 33.8±0.42ns | -0.29% | | deku_write_bits | 159.6±4.91ns | 158.8±3.33ns | -0.50% | | deku_write_byte | 22.9±1.77ns | **22.0±0.28ns** | **-3.93%** | | deku_write_enum | 21.4±0.27ns | 21.4±0.23ns | 0.00% | | deku_write_vec | 440.0±9.63ns | **347.9±3.52ns** | **-20.93%** |
github-actions[bot]
commented
6 months ago
Benchmark for 0ebb55f
Click to view benchmark
| Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1259.9±13.53ns | **1221.1±46.16ns** | **-3.08%** | | deku_read_byte | 5.4±0.08ns | **3.3±0.03ns** | **-38.89%** | | deku_read_enum | 2.6±0.06ns | 2.6±0.05ns | 0.00% | | deku_read_vec | 33.9±0.21ns | 33.8±0.60ns | -0.29% | | deku_write_bits | 165.0±16.83ns | **153.9±4.02ns** | **-6.73%** | | deku_write_byte | 22.6±0.32ns | **21.8±0.44ns** | **-3.54%** | | deku_write_enum | 21.4±0.32ns | 21.4±0.20ns | 0.00% | | deku_write_vec | 429.6±6.69ns | **347.6±4.24ns** | **-19.09%** |