You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2024. It is now read-only.
Avoid temporary Vec<u8> allocation during deserialization
Instead of reusing `Vec::<u8>::deserialize` to defer the
deserialization, implement a Visitor that can construct `$typ` directly
from the deserialization byte stream. This eliminates a temporary
allocation where the input byte stream is first copied into a `Vec<u8>`
and later copied to the stack to construct `$typ` via `transmute!`.
This saves a few microseconds (up to 1ms on specific hardware) when
deserializing microVM snapshots.
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
0 commit comments