Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: Add bit_order support #373

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Commits on Nov 19, 2023

  1. Implement from_reader io::Read support

    Add from_reader and use Read internally to improve the codegen of deku,
    the performance of derived parsers. Internally, this is implemented
    using the new src/reader.rs interface in deku parses. This has a waterfall
    effect on DekuReader implementations and the deku-derive/deku_read Derived impl.
    Previous usage with from_bytes and other API's are unchanged.
    There is somewhat of a performance hit for bit-only parses,
    but I find the major improvments in the bytes-wise parsing to be great enough
    to warrent this change.
    
    The following are some sample benchmarks:
    > critcmp before after
    group                  after                                  before
    -----                  -----                                  ------
    deku_read_bits         1.24   845.8±14.29ns        ? ?/sec    1.00   679.5±11.83ns        ? ?/sec
    deku_read_byte         1.00     17.8±0.25ns        ? ?/sec    2.12     37.8±3.35ns        ? ?/sec
    deku_read_enum         1.00     15.3±0.15ns        ? ?/sec    2.04     31.2±0.81ns        ? ?/sec
    deku_read_vec          1.00    676.8±7.04ns        ? ?/sec    2.16  1459.5±40.22ns        ? ?/sec
    deku_write_bits        1.00    125.3±3.10ns        ? ?/sec    1.04   130.2±11.12ns        ? ?/sec
    deku_write_byte        1.00    161.6±4.86ns        ? ?/sec    1.02    165.0±5.91ns        ? ?/sec
    deku_write_enum        1.00    105.6±1.06ns        ? ?/sec    1.03    109.0±7.20ns        ? ?/sec
    deku_write_vec         1.00      4.6±0.04µs        ? ?/sec    1.06      4.9±0.07µs        ? ?/sec
    
    The above change removes DekuRead, and replaces it with DekuReader. This contains
    the from_reader_with_ctx. DekuContainerRead contains from_reader.
    
    The crate no_std_io was picked to supply a Read impl
    for the no_std feature. These are "re-export"ed.
    
    Add "`Read` enabled" docs to lib.rs
    
    Add tests/test_tuple.rs tests
    
    Update CHANGELOG.md to reflect changes and help migration to this usage
    
    Use llvm-cov in ci for the generation of more accurate coverage reports
    
    Update benchmarks to test more complex parser speeds
    
    Disable Miri CI
    
    Update ensure_no_std to work with new Read usage. Remove wee-alloc in favour
    of an updated crate for the allocator.
    
    Add inline to small functions
    wcampbell0x2a committed Nov 19, 2023
    Configuration menu
    Copy the full SHA
    c0f9fd4 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2023

  1. Impl Write support

    wcampbell0x2a committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    979afff View commit details
    Browse the repository at this point in the history
  2. Add bit_order support

    wcampbell0x2a committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    bcaab04 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2024

  1. Configuration menu
    Copy the full SHA
    62c1ddb View commit details
    Browse the repository at this point in the history
  2. Add test from issue 371

    wcampbell0x2a committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    32d4588 View commit details
    Browse the repository at this point in the history