phrwlk opened PR #12464 from phrwlk:perf/wave-make-tuple-no-vec to bytecodealliance:main:
Before this change, WasmValue::make_tuple for wasmtime::Val always collected the input iterator into a Vec and then tried to convert it into a [Val; 2]. For V128 tuples we always expect exactly two i64 values, so this extra Vec allocation was unnecessary overhead.
This commit rewrites make_tuple to consume the iterator directly, reading exactly two values and returning the same "expected 2 values" / "expected 2 i64s (v64x2)" errors when the arity or types are wrong, without changing any observable behavior.
phrwlk requested fitzgen for a review on PR #12464.
phrwlk requested wasmtime-core-reviewers for a review on PR #12464.
alexcrichton submitted PR review:
Thanks!
alexcrichton has enabled auto merge for PR #12464.
alexcrichton added PR #12464 perf(wave): avoid Vec allocation in make_tuple to the merge queue.
alexcrichton merged PR #12464.
alexcrichton removed PR #12464 perf(wave): avoid Vec allocation in make_tuple from the merge queue.
Last updated: Jan 29 2026 at 13:25 UTC