Faust SetControls: remove per-call allocation #2
Loading…
Reference in a new issue
No description provided.
Delete branch "aqua/setcontrols-no-alloc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Marshal.Copy([value], 0, zone, 1)allocated afloat[1](32 B) per control, and theforeachoverIReadOnlyDictionaryboxed an enumerator (56 B) per call. Now the float bits are written straight to the zone withMarshal.WriteInt32, and aDictionary<string,float>argument is iterated with its struct enumerator (interface fallback kept for other callers).Evidence (Linux, .NET 10.0.14, Faust 2.90.20, 10000 blocks x 512 frames, 2 controls set per block,
dx7/algorithm-8-bright-pairandadvanced/additive-pad):Mean block time is unchanged (0.078 ms / 0.133 ms). A 3 s render of bright-pair is byte-identical before and after (peak 0.1504, RMS 0.02093), so the zone write is bit-exact.
Not covered: no new unit test (the allocation check lives in the out-of-tree smoke harness); Linux only. Not merged.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.