• Clemens Backes's avatar
    [wasm] Avoid signature map lookup if possible · c65c71b5
    Clemens Backes authored
    When updating the dispatch tables, the other instances are often
    generated from the same wire bytes, or there is only the one original
    instance in that list of instances. In both cases we can avoid the
    costly hash table lookup, and just use the signature index from the
    originating module.
    
    For big modules, this saves more than 50% of time for updating the
    dispatch tables, and ~25% of overall instantiation time.
    
    R=manoskouk@chromium.org
    
    Bug: v8:12593
    Change-Id: I356d5dd10f6c0738330e9a8d1cb27f60ff21215a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3432212Reviewed-by: 's avatarManos Koukoutos <manoskouk@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78941}
    c65c71b5
wasm-objects.cc 95.2 KB