From e2bfe675720a5e75355934cc9b17dcfbd89a8cd4 Mon Sep 17 00:00:00 2001 From: Noah Treuhaft Date: Thu, 27 Aug 2026 19:29:17 -0400 Subject: [PATCH] runtime/vam/op: use scode.Builder.Truncate in hashJoin.wrap This noticeably improves wrap performance by eliminating allocations. Switching from Builder.Reset to Truncate is safe because the super.Value returned by any call to wrap is unreachable when the next call occurs. --- runtime/vam/op/hashjoin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/vam/op/hashjoin.go b/runtime/vam/op/hashjoin.go index ce30a22bc..2c56385a6 100644 --- a/runtime/vam/op/hashjoin.go +++ b/runtime/vam/op/hashjoin.go @@ -280,7 +280,7 @@ func (j *hashJoin) wrap(l, r *super.Value) super.Value { if j.style == "right" { l, r = r, l } - j.builder.Reset() + j.builder.Truncate() var fields []super.Field if l != nil { left := l.Deunion()