sharksforarms / deku

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

Impl writer #355

Closed wcampbell0x2a closed 7 months ago

wcampbell0x2a commented 1 year ago

Implement faster writing for bytes and support for Write. At the expense of some performance for only bit-wise writing.

Tested

Create Issue

See https://github.com/wcampbell0x2a/deku-bench/pull/6 (that uses https://github.com/sharksforarms/deku/pull/393)

github-actions[bot] commented 1 year ago

Benchmark for 54c55ed

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **725.8±0.70ns** | 776.2±0.91ns | **+6.94%** | | deku_read_byte | **25.7±1.32ns** | 25.8±0.07ns | **+0.39%** | | deku_read_enum | 10.7±0.10ns | **10.4±0.08ns** | **-2.80%** | | deku_read_vec | 71.4±0.33ns | **65.3±0.13ns** | **-8.54%** | | deku_write_bits | **102.8±0.44ns** | 268.7±1.57ns | **+161.38%** | | deku_write_byte | 152.4±0.59ns | **37.7±0.17ns** | **-75.26%** | | deku_write_enum | 101.5±0.49ns | **31.8±0.27ns** | **-68.67%** | | deku_write_vec | 4.0±0.01µs | **523.4±2.79ns** | **-86.91%** |
github-actions[bot] commented 1 year ago

Benchmark for bd28774

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **937.3±50.25ns** | 1014.1±58.33ns | **+8.19%** | | deku_read_byte | **26.7±1.59ns** | 30.2±3.09ns | **+13.11%** | | deku_read_enum | 12.7±0.88ns | 12.4±0.93ns | -2.36% | | deku_read_vec | 75.5±4.17ns | 75.1±4.56ns | -0.53% | | deku_write_bits | **132.7±9.29ns** | 357.4±24.82ns | **+169.33%** | | deku_write_byte | 189.2±11.39ns | **41.5±2.83ns** | **-78.07%** | | deku_write_enum | 122.8±6.30ns | **34.6±2.19ns** | **-71.82%** | | deku_write_vec | 4.7±0.26µs | **577.2±119.10ns** | **-87.72%** |
github-actions[bot] commented 1 year ago

Benchmark for 95f691c

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1103.8±70.05ns | 1134.2±67.78ns | +2.75% | | deku_read_byte | 31.0±1.20ns | 31.5±1.67ns | +1.61% | | deku_read_enum | **14.4±0.69ns** | 15.1±1.91ns | **+4.86%** | | deku_read_vec | 89.4±5.26ns | 88.4±5.63ns | -1.12% | | deku_write_bits | **151.0±6.56ns** | 326.1±26.75ns | **+115.96%** | | deku_write_byte | 219.6±22.20ns | **48.9±2.14ns** | **-77.73%** | | deku_write_enum | 145.0±15.60ns | **42.1±1.32ns** | **-70.97%** | | deku_write_vec | 5.4±0.31µs | **692.7±31.56ns** | **-87.17%** |
github-actions[bot] commented 1 year ago

Benchmark for ed7c8e1

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1052.9±1.05ns** | 1084.6±10.88ns | **+3.01%** | | deku_read_byte | **31.3±0.72ns** | 33.0±0.50ns | **+5.43%** | | deku_read_enum | **13.7±0.02ns** | 15.1±0.11ns | **+10.22%** | | deku_read_vec | **83.3±0.45ns** | 83.9±0.17ns | **+0.72%** | | deku_write_bits | **147.6±0.07ns** | 299.5±0.37ns | **+102.91%** | | deku_write_byte | 202.0±1.07ns | **52.0±0.29ns** | **-74.26%** | | deku_write_enum | 134.9±0.56ns | **45.4±0.12ns** | **-66.35%** | | deku_write_vec | 5.1±0.02µs | **591.8±0.37ns** | **-88.40%** |
github-actions[bot] commented 1 year ago

Benchmark for 699a870

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1053.9±1.30ns** | 1091.9±1.35ns | **+3.61%** | | deku_read_byte | 31.1±0.14ns | **30.4±0.07ns** | **-2.25%** | | deku_read_enum | **13.8±0.03ns** | 15.4±0.11ns | **+11.59%** | | deku_read_vec | 83.1±0.25ns | **82.8±0.25ns** | **-0.36%** | | deku_write_bits | **147.9±0.16ns** | 297.7±0.29ns | **+101.28%** | | deku_write_byte | 201.8±2.31ns | **54.8±0.36ns** | **-72.84%** | | deku_write_enum | 134.6±0.58ns | **46.3±0.18ns** | **-65.60%** | | deku_write_vec | 5.1±0.02µs | **589.2±0.44ns** | **-88.45%** |
github-actions[bot] commented 1 year ago

Benchmark for 3e9011c

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 779.1±0.85ns | **775.2±0.50ns** | **-0.50%** | | deku_read_byte | **23.7±0.74ns** | 23.9±0.08ns | **+0.84%** | | deku_read_enum | **9.9±0.07ns** | 10.0±0.31ns | **+1.01%** | | deku_read_vec | 67.7±0.67ns | **67.3±0.13ns** | **-0.59%** | | deku_write_bits | **109.4±0.51ns** | 251.6±1.02ns | **+129.98%** | | deku_write_byte | 156.0±0.63ns | **42.6±0.18ns** | **-72.69%** | | deku_write_enum | 106.9±0.90ns | **35.5±0.27ns** | **-66.79%** | | deku_write_vec | 3.9±0.01µs | **622.0±9.60ns** | **-84.05%** |
github-actions[bot] commented 1 year ago

Benchmark for eb2f763

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **893.0±0.58ns** | 904.3±2.09ns | **+1.27%** | | deku_read_byte | **23.0±0.16ns** | 24.8±0.18ns | **+7.83%** | | deku_read_enum | 11.2±0.07ns | **11.1±0.09ns** | **-0.89%** | | deku_read_vec | 68.7±0.14ns | 68.8±0.19ns | +0.15% | | deku_write_bits | **127.4±0.09ns** | 251.1±1.50ns | **+97.10%** | | deku_write_byte | 182.2±1.07ns | **43.6±0.28ns** | **-76.07%** | | deku_write_enum | 119.2±0.48ns | **37.6±0.13ns** | **-68.46%** | | deku_write_vec | 4.6±0.00µs | **507.2±2.27ns** | **-88.97%** |
github-actions[bot] commented 1 year ago

Benchmark for 91bbf94

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 832.6±36.62ns | 860.2±48.40ns | +3.31% | | deku_read_byte | **21.6±0.98ns** | 24.4±1.15ns | **+12.96%** | | deku_read_enum | 11.3±0.56ns | **10.5±0.68ns** | **-7.08%** | | deku_read_vec | 64.3±2.52ns | 64.9±2.73ns | +0.93% | | deku_write_bits | **118.8±6.93ns** | 231.4±16.04ns | **+94.78%** | | deku_write_byte | 172.5±8.25ns | **43.0±2.28ns** | **-75.07%** | | deku_write_enum | 113.4±6.13ns | **36.8±1.66ns** | **-67.55%** | | deku_write_vec | 4.3±0.22µs | **441.7±16.68ns** | **-89.73%** |
github-actions[bot] commented 1 year ago

Benchmark for 28f76c8

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **776.4±1.38ns** | 781.3±0.62ns | **+0.63%** | | deku_read_byte | **24.0±0.44ns** | 25.6±0.11ns | **+6.67%** | | deku_read_enum | **10.1±0.09ns** | 10.2±0.08ns | **+0.99%** | | deku_read_vec | **67.5±0.30ns** | 67.8±0.21ns | **+0.44%** | | deku_write_bits | **106.5±0.44ns** | 228.2±7.17ns | **+114.27%** | | deku_write_byte | 165.0±1.08ns | **40.8±0.19ns** | **-75.27%** | | deku_write_enum | 105.7±0.46ns | **35.2±0.64ns** | **-66.70%** | | deku_write_vec | 4.0±0.01µs | **509.7±7.92ns** | **-87.26%** |
github-actions[bot] commented 1 year ago

Benchmark for ada4d93

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1872.6±125.63ns | 1867.9±79.36ns | -0.25% | | deku_read_byte | 26.6±1.25ns | 26.2±0.95ns | -1.50% | | deku_read_enum | 12.4±0.78ns | 12.1±0.49ns | -2.42% | | deku_read_vec | **73.6±2.35ns** | 76.2±5.11ns | **+3.53%** | | deku_write_bits | **175.5±7.25ns** | 319.2±14.09ns | **+81.88%** | | deku_write_byte | 193.4±5.91ns | **43.7±1.28ns** | **-77.40%** | | deku_write_enum | 131.1±5.37ns | **37.9±1.17ns** | **-71.09%** | | deku_write_vec | 4.5±0.26µs | **532.5±23.09ns** | **-88.17%** |
github-actions[bot] commented 1 year ago

Benchmark for 64901e4

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1404.3±1.14ns | **1402.9±7.37ns** | **-0.10%** | | deku_read_byte | **25.4±0.22ns** | 25.9±0.11ns | **+1.97%** | | deku_read_enum | **9.8±0.06ns** | 10.2±0.10ns | **+4.08%** | | deku_read_vec | **66.0±0.28ns** | 70.3±0.36ns | **+6.52%** | | deku_write_bits | **140.3±0.31ns** | 250.0±0.48ns | **+78.19%** | | deku_write_byte | 158.0±0.58ns | **40.7±0.17ns** | **-74.24%** | | deku_write_enum | 105.4±0.51ns | **34.5±0.17ns** | **-67.27%** | | deku_write_vec | 3.9±0.01µs | **415.1±1.76ns** | **-89.36%** |
github-actions[bot] commented 1 year ago

Benchmark for b1956c2

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 2.0±0.01µs | 2.0±0.02µs | 0.00% | | deku_read_byte | 33.0±1.97ns | **30.3±0.14ns** | **-8.18%** | | deku_read_enum | **13.4±0.13ns** | 25.5±0.05ns | **+90.30%** | | deku_read_vec | 83.3±3.20ns | **81.3±0.32ns** | **-2.40%** | | deku_write_bits | **193.8±1.25ns** | 350.4±0.45ns | **+80.80%** | | deku_write_byte | 207.3±1.13ns | **53.6±0.47ns** | **-74.14%** | | deku_write_enum | 140.2±1.08ns | **48.2±0.64ns** | **-65.62%** | | deku_write_vec | 5.3±0.02µs | **448.2±0.53ns** | **-91.54%** |
github-actions[bot] commented 1 year ago

Benchmark for f60fb68

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 2.2±0.10µs | 2.3±0.16µs | +4.55% | | deku_read_byte | 32.5±1.91ns | 32.7±1.48ns | +0.62% | | deku_read_enum | 14.4±0.89ns | 14.8±1.17ns | +2.78% | | deku_read_vec | 88.3±7.06ns | 93.8±6.03ns | +6.23% | | deku_write_bits | **214.6±11.27ns** | 401.0±16.73ns | **+86.86%** | | deku_write_byte | 242.0±15.10ns | **52.9±1.98ns** | **-78.14%** | | deku_write_enum | 157.1±5.69ns | **46.6±3.62ns** | **-70.34%** | | deku_write_vec | 5.6±0.35µs | **526.2±27.53ns** | **-90.60%** |
github-actions[bot] commented 1 year ago

Benchmark for aa9c730

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1187.2±11.38ns** | 1297.4±17.88ns | **+9.28%** | | deku_read_byte | 21.7±0.24ns | 21.6±0.34ns | -0.46% | | deku_read_enum | **9.3±0.16ns** | 9.6±0.65ns | **+3.23%** | | deku_read_vec | **57.7±0.75ns** | 58.6±0.89ns | **+1.56%** | | deku_write_bits | **128.4±1.16ns** | 209.9±3.56ns | **+63.47%** | | deku_write_byte | 136.4±4.24ns | **36.5±1.56ns** | **-73.24%** | | deku_write_enum | 92.3±5.37ns | **30.7±0.33ns** | **-66.74%** | | deku_write_vec | 3.2±0.15µs | **276.4±3.20ns** | **-91.36%** |
github-actions[bot] commented 11 months ago

Benchmark for f06e5b0

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1217.2±12.65ns** | 1266.0±15.37ns | **+4.01%** | | deku_read_byte | 21.5±0.48ns | 21.7±0.53ns | +0.93% | | deku_read_enum | **9.3±0.10ns** | 9.5±0.70ns | **+2.15%** | | deku_read_vec | **58.1±0.57ns** | 59.0±1.58ns | **+1.55%** | | deku_write_bits | **155.5±4.64ns** | 200.1±5.83ns | **+28.68%** | | deku_write_byte | 126.2±10.88ns | **20.8±0.31ns** | **-83.52%** | | deku_write_enum | 83.7±1.78ns | **20.8±0.38ns** | **-75.15%** | | deku_write_vec | 3.2±0.10µs | **300.7±3.34ns** | **-90.60%** |
github-actions[bot] commented 11 months ago

Benchmark for d39c384

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1192.9±32.02ns** | 1235.1±17.87ns | **+3.54%** | | deku_read_byte | 21.7±2.93ns | 21.7±1.29ns | 0.00% | | deku_read_enum | 9.5±0.11ns | 9.4±0.11ns | -1.05% | | deku_read_vec | 59.5±0.46ns | **58.5±0.78ns** | **-1.68%** | | deku_write_bits | **151.7±4.27ns** | 245.3±28.80ns | **+61.70%** | | deku_write_byte | 146.7±4.59ns | **21.1±0.20ns** | **-85.62%** | | deku_write_enum | 96.9±4.03ns | **20.2±0.29ns** | **-79.15%** | | deku_write_vec | 3.2±0.05µs | **299.1±3.78ns** | **-90.65%** |
github-actions[bot] commented 11 months ago

Benchmark for 9616f9e

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1286.2±10.01ns | **1224.2±17.10ns** | **-4.82%** | | deku_read_byte | 21.8±0.44ns | 21.7±0.22ns | -0.46% | | deku_read_enum | 9.3±0.11ns | 9.4±0.24ns | +1.08% | | deku_read_vec | 59.6±0.68ns | **58.8±0.78ns** | **-1.34%** | | deku_write_bits | **140.4±4.96ns** | 204.6±6.64ns | **+45.73%** | | deku_write_byte | 132.6±3.39ns | **20.8±0.26ns** | **-84.31%** | | deku_write_enum | 85.4±4.49ns | **20.2±0.43ns** | **-76.35%** | | deku_write_vec | 3.2±0.03µs | **293.8±3.75ns** | **-90.82%** |
github-actions[bot] commented 11 months ago

Benchmark for 2771e12

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1265.2±29.15ns | **1202.0±47.65ns** | **-5.00%** | | deku_read_byte | 21.8±0.58ns | 21.8±0.57ns | 0.00% | | deku_read_enum | 9.3±0.24ns | 9.4±0.10ns | +1.08% | | deku_read_vec | 59.9±0.60ns | **58.8±0.56ns** | **-1.84%** | | deku_write_bits | **129.6±2.22ns** | 205.2±5.37ns | **+58.33%** | | deku_write_byte | 129.9±2.23ns | **20.9±0.67ns** | **-83.91%** | | deku_write_enum | 87.2±11.64ns | **20.2±0.31ns** | **-76.83%** | | deku_write_vec | 3.2±0.05µs | **294.3±3.82ns** | **-90.80%** |
github-actions[bot] commented 11 months ago

Benchmark for e3cde14

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1246.6±7.15ns** | 1301.1±16.34ns | **+4.37%** | | deku_read_byte | 21.7±0.43ns | 21.8±0.40ns | +0.46% | | deku_read_enum | 9.3±0.42ns | 9.4±0.16ns | +1.08% | | deku_read_vec | 60.2±0.63ns | **58.8±0.81ns** | **-2.33%** | | deku_write_bits | **144.1±5.12ns** | 203.7±4.61ns | **+41.36%** | | deku_write_byte | 129.8±2.72ns | **20.8±0.42ns** | **-83.98%** | | deku_write_enum | 84.9±2.19ns | **20.2±0.35ns** | **-76.21%** | | deku_write_vec | 3.2±0.06µs | **293.9±2.04ns** | **-90.82%** |
github-actions[bot] commented 11 months ago

Benchmark for ecc26a2

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1250.9±16.75ns | **1210.9±12.81ns** | **-3.20%** | | deku_read_byte | 21.7±0.15ns | 21.7±0.20ns | 0.00% | | deku_read_enum | 9.5±0.15ns | 9.6±0.14ns | +1.05% | | deku_read_vec | 59.4±0.43ns | **58.0±1.19ns** | **-2.36%** | | deku_write_bits | **158.9±3.63ns** | 207.1±14.57ns | **+30.33%** | | deku_write_byte | 137.8±5.31ns | **21.1±0.14ns** | **-84.69%** | | deku_write_enum | 91.9±3.93ns | **20.2±0.35ns** | **-78.02%** | | deku_write_vec | 3.2±0.04µs | **300.7±4.06ns** | **-90.60%** |
github-actions[bot] commented 11 months ago

Benchmark for 368d7b1

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1217.2±17.43ns | 1218.3±29.25ns | +0.09% | | deku_read_byte | 21.4±0.88ns | 21.1±0.76ns | -1.40% | | deku_read_enum | 9.5±0.14ns | **9.3±0.26ns** | **-2.11%** | | deku_read_vec | 59.6±0.47ns | **58.9±0.60ns** | **-1.17%** | | deku_write_bits | **143.9±5.64ns** | 210.0±11.87ns | **+45.93%** | | deku_write_byte | 144.4±3.25ns | **20.9±0.48ns** | **-85.53%** | | deku_write_enum | 106.7±4.84ns | **19.9±0.28ns** | **-81.35%** | | deku_write_vec | 3.2±0.02µs | **299.1±4.77ns** | **-90.65%** |
github-actions[bot] commented 11 months ago

Benchmark for af8fe3d

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1227.2±9.79ns** | 1350.9±11.07ns | **+10.08%** | | deku_read_byte | 21.4±0.87ns | 21.4±0.23ns | 0.00% | | deku_read_enum | 9.5±0.17ns | 9.5±0.14ns | 0.00% | | deku_read_vec | 59.5±0.76ns | **58.3±0.75ns** | **-2.02%** | | deku_write_bits | **139.7±4.48ns** | 206.6±3.32ns | **+47.89%** | | deku_write_byte | 144.0±3.88ns | **20.8±0.17ns** | **-85.56%** | | deku_write_enum | 84.7±2.29ns | **19.9±0.21ns** | **-76.51%** | | deku_write_vec | 3.2±0.07µs | **299.6±2.60ns** | **-90.64%** |
github-actions[bot] commented 11 months ago

Benchmark for c9e7bc7

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1239.9±17.79ns | **1222.2±12.21ns** | **-1.43%** | | deku_read_byte | **20.9±0.86ns** | 21.4±0.27ns | **+2.39%** | | deku_read_enum | 9.6±0.15ns | **9.3±0.15ns** | **-3.12%** | | deku_read_vec | **57.4±0.46ns** | 59.4±0.60ns | **+3.48%** | | deku_write_bits | **125.4±7.93ns** | 199.9±6.87ns | **+59.41%** | | deku_write_byte | 130.7±5.69ns | **21.4±0.35ns** | **-83.63%** | | deku_write_enum | 90.5±5.86ns | **20.5±0.33ns** | **-77.35%** | | deku_write_vec | 3.1±0.04µs | **263.6±2.55ns** | **-91.50%** |
github-actions[bot] commented 11 months ago

Benchmark for e00c189

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1175.9±22.33ns | 1198.2±30.79ns | +1.90% | | deku_read_byte | 21.1±0.83ns | 21.5±0.47ns | +1.90% | | deku_read_enum | 9.6±0.18ns | 9.5±0.21ns | -1.04% | | deku_read_vec | **57.6±0.81ns** | 59.5±0.70ns | **+3.30%** | | deku_write_bits | **125.1±3.90ns** | 211.3±4.61ns | **+68.90%** | | deku_write_byte | 135.7±4.66ns | **21.4±0.23ns** | **-84.23%** | | deku_write_enum | 92.5±5.42ns | **20.8±0.35ns** | **-77.51%** | | deku_write_vec | 3.1±0.04µs | **291.7±4.34ns** | **-90.59%** |
github-actions[bot] commented 11 months ago

Benchmark for d526b58

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1238.6±14.99ns | **1207.0±46.87ns** | **-2.55%** | | deku_read_byte | 20.9±0.40ns | 20.9±0.37ns | 0.00% | | deku_read_enum | 9.5±0.14ns | **9.3±0.15ns** | **-2.11%** | | deku_read_vec | **57.4±0.53ns** | 59.8±0.89ns | **+4.18%** | | deku_write_bits | **126.3±3.10ns** | 195.1±3.94ns | **+54.47%** | | deku_write_byte | 128.4±9.55ns | **21.4±0.19ns** | **-83.33%** | | deku_write_enum | 94.4±3.11ns | **20.5±0.23ns** | **-78.28%** | | deku_write_vec | 3.1±0.06µs | **293.0±3.06ns** | **-90.55%** |
wcampbell0x2a commented 11 months ago

@sharksforarms this is ready for review!

github-actions[bot] commented 11 months ago

Benchmark for 19ac421

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1304.6±16.95ns | **1231.1±10.18ns** | **-5.63%** | | deku_read_byte | 21.0±0.94ns | 21.2±0.49ns | +0.95% | | deku_read_enum | 9.6±0.16ns | **9.3±0.09ns** | **-3.12%** | | deku_read_vec | **57.6±0.50ns** | 59.3±0.43ns | **+2.95%** | | deku_write_bits | **134.7±5.21ns** | 196.6±3.72ns | **+45.95%** | | deku_write_byte | 134.7±5.09ns | **21.6±0.31ns** | **-83.96%** | | deku_write_enum | 95.5±6.96ns | **20.5±0.32ns** | **-78.53%** | | deku_write_vec | 3.1±0.04µs | **315.2±3.88ns** | **-89.83%** |
github-actions[bot] commented 11 months ago

Benchmark for b1289a1

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1216.1±9.56ns** | 1278.5±12.77ns | **+5.13%** | | deku_read_byte | **20.8±0.35ns** | 21.2±0.49ns | **+1.92%** | | deku_read_enum | 9.6±0.19ns | 9.5±0.16ns | -1.04% | | deku_read_vec | **57.4±0.87ns** | 59.2±0.45ns | **+3.14%** | | deku_write_bits | **125.2±5.48ns** | 199.4±22.62ns | **+59.27%** | | deku_write_byte | 130.7±3.47ns | **21.4±0.38ns** | **-83.63%** | | deku_write_enum | 95.6±3.05ns | **20.5±0.39ns** | **-78.56%** | | deku_write_vec | 3.1±0.04µs | **389.6±2.86ns** | **-87.43%** |
github-actions[bot] commented 11 months ago

Benchmark for 4efac0e

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1274.3±20.31ns | **1240.7±25.69ns** | **-2.64%** | | deku_read_byte | **20.8±0.20ns** | 21.5±0.35ns | **+3.37%** | | deku_read_enum | 9.5±0.28ns | 9.5±0.11ns | 0.00% | | deku_read_vec | **57.5±0.89ns** | 59.2±0.86ns | **+2.96%** | | deku_write_bits | **131.3±4.15ns** | 195.2±3.50ns | **+48.67%** | | deku_write_byte | 131.3±3.96ns | **21.4±0.22ns** | **-83.70%** | | deku_write_enum | 93.5±4.12ns | **20.6±0.52ns** | **-77.97%** | | deku_write_vec | 3.1±0.08µs | **297.8±4.18ns** | **-90.39%** |
sharksforarms commented 11 months ago

@wcampbell0x2a ack. I may not get to review it until the new year

wcampbell0x2a commented 11 months ago

Butterfingers closing the mr 😂

No problem! I also might bike-shed the names back to read and write instead of to_writer. Idk.

github-actions[bot] commented 11 months ago

Benchmark for e323734

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1213.5±37.96ns | 1226.0±16.02ns | +1.03% | | deku_read_byte | 21.1±0.45ns | 21.1±0.53ns | 0.00% | | deku_read_enum | 9.6±0.15ns | 9.5±0.14ns | -1.04% | | deku_read_vec | **58.2±0.44ns** | 59.1±0.43ns | **+1.55%** | | deku_write_bits | **125.9±4.66ns** | 194.4±2.03ns | **+54.41%** | | deku_write_byte | 130.4±6.15ns | **21.5±0.41ns** | **-83.51%** | | deku_write_enum | 90.7±5.51ns | **20.6±1.35ns** | **-77.29%** | | deku_write_vec | 3.1±0.07µs | **293.2±7.28ns** | **-90.54%** |
github-actions[bot] commented 11 months ago

Benchmark for 47f4940

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1102.4±10.87ns** | 1212.6±30.33ns | **+10.00%** | | deku_read_byte | **19.3±0.35ns** | 20.1±0.28ns | **+4.15%** | | deku_read_enum | 9.4±0.13ns | 9.5±0.16ns | +1.06% | | deku_read_vec | 54.1±1.11ns | 54.0±0.75ns | -0.18% | | deku_write_bits | **113.4±1.58ns** | 179.5±3.53ns | **+58.29%** | | deku_write_byte | 124.3±2.85ns | **21.3±0.33ns** | **-82.86%** | | deku_write_enum | 86.3±5.15ns | **20.2±0.31ns** | **-76.59%** | | deku_write_vec | 3.0±0.05µs | **264.1±1.73ns** | **-91.20%** |
github-actions[bot] commented 11 months ago

Benchmark for 17ab8fc

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | **1168.8±9.71ns** | 1245.5±18.43ns | **+6.56%** | | deku_read_byte | **18.9±0.39ns** | 20.2±0.59ns | **+6.88%** | | deku_read_enum | 9.3±0.17ns | 9.4±0.17ns | +1.08% | | deku_read_vec | 53.3±0.33ns | 53.3±0.53ns | 0.00% | | deku_write_bits | **112.1±1.18ns** | 187.7±4.28ns | **+67.44%** | | deku_write_byte | 125.3±3.64ns | **21.2±0.39ns** | **-83.08%** | | deku_write_enum | 89.4±5.12ns | **20.2±0.41ns** | **-77.40%** | | deku_write_vec | 5.0±0.03µs | **299.5±1.11ns** | **-94.01%** |
github-actions[bot] commented 11 months ago

Benchmark for 8ff18c4

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1203.8±18.27ns | **1106.5±16.74ns** | **-8.08%** | | deku_read_byte | 23.1±0.84ns | **22.0±0.48ns** | **-4.76%** | | deku_read_enum | 9.3±0.15ns | 9.3±0.15ns | 0.00% | | deku_read_vec | 53.6±0.81ns | 53.6±0.79ns | 0.00% | | deku_write_bits | **109.0±1.89ns** | 188.8±17.81ns | **+73.21%** | | deku_write_byte | 126.4±3.24ns | **20.8±0.21ns** | **-83.54%** | | deku_write_enum | 84.6±2.62ns | **20.2±0.33ns** | **-76.12%** | | deku_write_vec | 3.0±0.07µs | **265.0±28.27ns** | **-91.17%** |
github-actions[bot] commented 10 months ago

Benchmark for 6ce10f9

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1227.7±8.75ns | **1146.8±18.09ns** | **-6.59%** | | deku_read_byte | 23.0±0.36ns | **22.1±0.47ns** | **-3.91%** | | deku_read_enum | 9.3±0.13ns | 9.4±0.23ns | +1.08% | | deku_read_vec | 53.4±0.82ns | 53.5±0.65ns | +0.19% | | deku_write_bits | **108.9±1.77ns** | 181.5±4.34ns | **+66.67%** | | deku_write_byte | 121.7±2.30ns | **20.6±0.32ns** | **-83.07%** | | deku_write_enum | 86.6±10.19ns | **19.6±0.45ns** | **-77.37%** | | deku_write_vec | 3.0±0.04µs | **298.2±3.66ns** | **-90.06%** |
github-actions[bot] commented 10 months ago

Benchmark for 3d39323

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1184.4±12.63ns | **1150.3±11.76ns** | **-2.88%** | | deku_read_byte | 23.0±0.27ns | **22.1±0.33ns** | **-3.91%** | | deku_read_enum | 9.3±0.15ns | 9.4±0.15ns | +1.08% | | deku_read_vec | 53.5±0.67ns | 53.2±0.54ns | -0.56% | | deku_write_bits | **113.1±4.14ns** | 199.1±4.26ns | **+76.04%** | | deku_write_byte | 121.4±2.36ns | **20.6±0.20ns** | **-83.03%** | | deku_write_enum | 85.3±3.76ns | **19.4±0.39ns** | **-77.26%** | | deku_write_vec | 3.1±0.04µs | **304.6±5.71ns** | **-90.17%** |
github-actions[bot] commented 10 months ago

Benchmark for 4a4679c

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1198.8±11.17ns | **1079.3±20.78ns** | **-9.97%** | | deku_read_byte | 22.8±0.70ns | **21.5±0.34ns** | **-5.70%** | | deku_read_enum | 9.3±0.13ns | 9.4±0.13ns | +1.08% | | deku_read_vec | 53.3±0.63ns | 53.4±0.74ns | +0.19% | | deku_write_bits | **108.6±1.51ns** | 197.9±5.05ns | **+82.23%** | | deku_write_byte | 122.3±3.46ns | **20.5±0.36ns** | **-83.24%** | | deku_write_enum | 85.4±3.41ns | **19.2±0.34ns** | **-77.52%** | | deku_write_vec | 3.0±0.04µs | **300.5±3.91ns** | **-89.98%** |
github-actions[bot] commented 7 months ago

Benchmark for 6633da3

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | deku_read_bits | 1242.5±24.81ns | **1160.3±18.15ns** | **-6.62%** | | deku_read_byte | **20.3±0.51ns** | 20.9±0.64ns | **+2.96%** | | deku_read_enum | **9.3±0.08ns** | 9.4±0.17ns | **+1.08%** | | deku_read_vec | 59.2±0.58ns | **58.1±0.59ns** | **-1.86%** | | deku_write_bits | **122.8±6.65ns** | 191.6±6.69ns | **+56.03%** | | deku_write_byte | 122.3±3.33ns | **21.1±0.37ns** | **-82.75%** | | deku_write_enum | 87.3±3.93ns | **20.5±0.19ns** | **-76.52%** | | deku_write_vec | 3.0±0.06µs | **281.1±3.14ns** | **-90.63%** |