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

Wasm32 SIMD Rust implementation #341

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

Commits on Sep 11, 2023

  1. Wasm32 SIMD implementation

    This code is based on rust_sse2.rs of the same distribution, and is
    subject to further improvements. Some comments are left intact even if
    their applicability is questioned.
    
    SIMD implementation is gated by `wasm32-simd` feature, portable version
    is used otherwise.
    
    Performance measurements with a primitive benchmark with ~16Kb of data:
    
    | M1 native     | 11,610 ns |
    | M1 WASM SIMD  | 13,355 ns |
    | M1 WASM       | 22,037 ns |
    | x64 native    |  6,713 ns |
    | x64 WASM SIMD | 11,985 ns |
    | x64 WASM      | 25,978 ns |
    
    wasmtime v12.0.1 was used on both platforms.
    
    Closes BLAKE3-team#187.
    monoid committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    909c6fc View commit details
    Browse the repository at this point in the history
  2. Misc textual improvements

    monoid committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    cdeb9f7 View commit details
    Browse the repository at this point in the history
  3. Remove unsafe from functions that do not need it

    Wasm SIMD API has certain function safe.
    monoid committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    9221b99 View commit details
    Browse the repository at this point in the history
  4. Fix comment

    monoid committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    87d286f View commit details
    Browse the repository at this point in the history
  5. Fix platform constants

    monoid committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    dca1a10 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. Make some function safe

    Certain functions' unsafety comes from v128 loads and store.  If
    argument types guarantee that these loads and stores are safe, function
    is declared safe, and internal unsafe blocks are commented.
    monoid committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    e2a4953 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fe8ef32 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

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