sharksforarms / deku

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

Change Strings in DekuError to Cow<'static, str> #434

Closed wcampbell0x2a closed 2 months ago

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

Benchmark for 8d0b177

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1213.5±18.41ns** | 1263.7±12.28ns | **+4.14%** | | deku_read_byte | 5.7±0.08ns | 5.7±0.14ns | 0.00% | | deku_read_enum | 2.6±0.07ns | **2.5±0.07ns** | **-3.85%** | | deku_read_vec | 36.9±0.50ns | **35.1±0.41ns** | **-4.88%** | | deku_write_bits | 179.1±1.88ns | 180.9±4.08ns | +1.01% | | deku_write_byte | **21.7±0.41ns** | 22.0±0.23ns | **+1.38%** | | deku_write_enum | 20.5±0.31ns | 20.3±0.76ns | -0.98% | | deku_write_vec | **290.9±4.74ns** | 297.6±7.06ns | **+2.30%** |
github-actions[bot] commented 2 months ago

Benchmark for b1814be

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1175.2±22.34ns** | 1270.0±41.34ns | **+8.07%** | | deku_read_byte | 5.7±0.08ns | 5.7±0.07ns | 0.00% | | deku_read_enum | 2.5±0.05ns | 2.5±0.07ns | 0.00% | | deku_read_vec | 36.3±0.40ns | 36.1±0.48ns | -0.55% | | deku_write_bits | 190.0±6.75ns | **182.2±3.32ns** | **-4.11%** | | deku_write_byte | **21.7±0.27ns** | 22.1±0.60ns | **+1.84%** | | deku_write_enum | 20.5±0.49ns | 20.5±0.30ns | 0.00% | | deku_write_vec | **290.1±2.56ns** | 293.8±4.69ns | **+1.28%** |
sharksforarms commented 2 months ago

May be worth at this point to add in the docs about how to reduce binary size, given that there's now a feature flag + optimizations around it. Could you write a blurb for this in the lib.rs?

wcampbell0x2a commented 2 months ago

May be worth at this point to add in the docs about how to reduce binary size, given that there's now a feature flag + optimizations around it. Could you write a blurb for this in the lib.rs?

Sure, I'll add that tonight

wcampbell0x2a commented 2 months ago

May be worth at this point to add in the docs about how to reduce binary size, given that there's now a feature flag + optimizations around it. Could you write a blurb for this in the lib.rs?

Sure, I'll add that tonight

@sharksforarms added!

github-actions[bot] commented 2 months ago

Benchmark for edf195e

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1342.0±19.12ns | **1265.8±15.46ns** | **-5.68%** | | deku_read_byte | **5.3±0.06ns** | 5.6±0.12ns | **+5.66%** | | deku_read_enum | **2.5±0.06ns** | 2.9±0.05ns | **+16.00%** | | deku_read_vec | 36.2±0.32ns | 35.9±0.48ns | -0.83% | | deku_write_bits | 148.9±3.33ns | 150.5±2.03ns | +1.07% | | deku_write_byte | 22.0±0.29ns | **21.7±0.30ns** | **-1.36%** | | deku_write_enum | 20.5±0.45ns | **20.2±0.28ns** | **-1.46%** | | deku_write_vec | 306.1±4.45ns | **289.2±5.12ns** | **-5.52%** |