Stream: git-wasmtime

Topic: wasmtime / PR #2821 Precompute fields in `VMOffsets`


view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2021 at 19:16):

alexcrichton opened PR #2821 from faster-vmoffsets to main:

This commit updates the implementation of VMOffsets to frontload all
checked arithmetic on construction of the VMOffsets which allows
eliding all checked arithmetic when accessing the fields of VMOffsets.
For testing and such this adds a new constructor as well from a new
VMOffsetsFields structure which is a clone of the old definition.

This should help speed up some profile hot spots I've been seeing where
with all the checked arithmetic on field sizes this was slowing down the
various accessors during instantiation (which uses VMOffsets to
initialize various fields of the VMContext).

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2021 at 19:46):

alexcrichton updated PR #2821 from faster-vmoffsets to main.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2021 at 20:01):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2021 at 21:17):

fitzgen merged PR #2821.


Last updated: Oct 23 2024 at 20:03 UTC