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

Optimize wasmi::Linker host function setup #989

Merged
merged 11 commits into from
Apr 21, 2024
Merged

Commits on Apr 20, 2024

  1. Configuration menu
    Copy the full SHA
    b45d89b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4d34b25 View commit details
    Browse the repository at this point in the history
  3. implement LenOrder and LenOrderStr string wrappers

    According to our benchmarks those string type wrappers and their custom Ord implementation improve Linker performance by roughly 50%. This is probably because the Rust compiler is able to inline the `memcmp` routines whereas with `Arc<str>` and `str` it uses `memcmp` calls which are inefficient for small strings.
    Robbepop committed Apr 20, 2024
    Configuration menu
    Copy the full SHA
    75b1706 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2024

  1. Configuration menu
    Copy the full SHA
    f099e3c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d0159b5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2965e9f View commit details
    Browse the repository at this point in the history
  4. refactor ImportKey and Symbol

    The new implementation optimizes the Ord impl of ImportKey since ImportKeys are compared more often than their fields are queried during Linker setup.
    Robbepop committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    5be3b35 View commit details
    Browse the repository at this point in the history
  5. use FuncType instead of DedupFuncType in HostFuncTrampolineEntity

    This allows us to create new HostFuncTrampolineEntities without an Engine and thus allow for a HostApi abstraction later to further optimize Linker setup.
    Also conveniently this allow us to get rid of tons of custom Debug implementations to resolve the no longer existing DedupFuncTypes.
    Robbepop committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    21effcd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c61abc4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    45f0ed9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    92aea8d View commit details
    Browse the repository at this point in the history