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

Various changes (hopefully improvements) #12

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

Commits on Feb 11, 2020

  1. Fix decode output buffer length calculation.

    The output length only needs to be half the input length.
    ggriffiniii committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    6f392c3 View commit details
    Browse the repository at this point in the history
  2. Upgrade criterion and test a variety of byte lengths.

    This uses criterions benchmark groups to compare the relative
    performance between the different implementations at various byte
    lengths. The criterion reports now provide graphs that overlay the
    different implementation so you can easily see the relative performance.
    ggriffiniii committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    a811901 View commit details
    Browse the repository at this point in the history
  3. Fix compiler warnings.

    Range patterns are deprecated, switch to inclusive ranges instead.
    Re-export the deprecated function `hex_to` in a separate use statement
    that allows deprecation warnings.
    ggriffiniii committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    50f9d46 View commit details
    Browse the repository at this point in the history
  4. Don't return an error when decoding an empty slice.

    This isn't an error condition. A decoded empty slice is just an empty
    slice.
    ggriffiniii committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    a5898da View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2020

  1. Configuration menu
    Copy the full SHA
    59e5b28 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2020

  1. Reorganize decode into submodules.

    This also removes functions from the public api. hex_decode and
    hex_decode_unchecked are the only things exposed by default.
    hex_check_sse, hex_check_fallback, and hex_decode_fallback are only
    visible when compiled with the 'bench' feature. This means that benches
    now need to specify --features=bench when running.
    
    $ cargo bench --features=bench
    
    This makes no changes to the actual implementation and benchmarks
    confirm that.
    ggriffiniii committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    2605d11 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ca46185 View commit details
    Browse the repository at this point in the history
  3. Modify the avx2::hex_check

    Rather than checking to ensure all bytes are within valid ranges, this
    now checks to ensure no bytes are within invalid ranges. This is mostly
    to avoid compiler warning when comparing an i32 to 0xffff because we now
    compare the i32 to zero.
    
    The performance is identical.
    ggriffiniii committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    21cacdd View commit details
    Browse the repository at this point in the history
  4. Modify decode to check the input as decoding rather than as a separat…

    …e pass over the input data.
    
    This speeds up checked decoding substantially, while not changing the
    performance of unchecked decoding.
    
    On my machine this increases throughput when decoding 2 bytes of data by
    20%, and when decoding 4096 bytes of data by 116%.
    ggriffiniii committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    0de392a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fcb43b2 View commit details
    Browse the repository at this point in the history
  6. New avx2 decode algorithm.

    Use a lookup table to determine the offset to add to each byte. This
    improves performance substantially.
    
    decode/faster_hex/4096 thrpt increased 15%
    decode/faster_hex_unchecked/4096 thrpt increased 54%
    ggriffiniii committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    ad34b9e View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2020

  1. Configuration menu
    Copy the full SHA
    4d1af86 View commit details
    Browse the repository at this point in the history
  2. New encode algorithm

    ggriffiniii committed Feb 18, 2020
    Configuration menu
    Copy the full SHA
    2773009 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e5c516f View commit details
    Browse the repository at this point in the history
  4. Add sse decoding

    ggriffiniii committed Feb 18, 2020
    Configuration menu
    Copy the full SHA
    1558c78 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b7e178b View commit details
    Browse the repository at this point in the history
  6. Add a decode function that returns a Vec<u8> and a couple proptests to

    compare the implementation against the hex crate.
    ggriffiniii committed Feb 18, 2020
    Configuration menu
    Copy the full SHA
    ae677f1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9bd7c34 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    124a106 View commit details
    Browse the repository at this point in the history
  9. Remove the check bench and implementations.

    The benches added unnecessary code that isn't available via the public
    api and is only benchmarked as a side-effect of the decode benchmark.
    ggriffiniii committed Feb 18, 2020
    Configuration menu
    Copy the full SHA
    8d8ace9 View commit details
    Browse the repository at this point in the history