Repository navigation
Lift component byte lists in bulk from Wasm to Elixir - #1043
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
list<u8>andresult<list<u8>, string>export results when the existingbinary_byte_lists: trueoption is enabled. The returned binary owns the buffer copied before the guest post-return hook.WasmList<u8>for common reply types and copy it directly into a BEAM binary. Existing list mode and unmatched signatures continue through dynamic conversion.Reproduction
Build the release NIF in both checkouts with
WASMEX_BUILD=1 mix compile. The baseline is9a571f4(Wasmex main after PR #1042). Run the benchmark script and fixture from this PR's checkout for both builds. Setbuildto the absolute path of the checkout whose NIF you want to measure. Each command starts a fresh VM. On macOS,/usr/bin/time -lreports peak RSS.Medians of five fresh VMs per case on arm64 macOS, interleaving the previous and optimized release NIFs.
The benchmark checks payload length and the first and last bytes. The tests check full payload equality after guest cleanup and memory reuse, empty binaries, list mode, and bounds failure before callback invocation.
Verification