Operating System
What feature would you like to be added?
A reduction in overhad for purego calls
Why is this needed?
RegisterFunc/CFunc/15args costs ~1845 ns with 44 allocs. Profiling shows the hot spots are repeated reflect.StructOf in Darwin ARM64 stack bundling (rebuilds struct type every call), heap-allocated []reflect.Value in callbackWrap (38.5% of total allocs), deferred cleanup closures, and per-call reflect.Kind dispatch. All of this is internal — no API changes needed.
Operating System
What feature would you like to be added?
A reduction in overhad for purego calls
Why is this needed?
RegisterFunc/CFunc/15args costs ~1845 ns with 44 allocs. Profiling shows the hot spots are repeated reflect.StructOf in Darwin ARM64 stack bundling (rebuilds struct type every call), heap-allocated []reflect.Value in callbackWrap (38.5% of total allocs), deferred cleanup closures, and per-call reflect.Kind dispatch. All of this is internal — no API changes needed.