-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove #cgo noescape nocallback directives #128
Comments
We don't necessarily need to stop using them until Go 1.23. The bug is that pre-go1.22 versions of However:
On the balance, I agree that removing the directives is the right call. |
It's surprising to me how solid the case for it being ok to leave them in. 😄 But I agree, my impression is that the memory improvement from using I'll submit a quick PR to remove the file. (The microsoft/go upstream sync PR is actually currently blocked on this after the upstream revert.) |
It is possible to get the same results by using well-crafted C wrappers, as we are already doing in Line 85 in 61234a9
|
Submitted #129 with a simple remove. Will take a stab at writing wrappers. |
Thanks to the upstream issue golang/go#63293, reported by @corhere, the Go team has decided to revert some buggy #cgo directives used in this project. We need to stop using them, as they won't compile anymore on tip.
Plain removal is fine, as they are just an optimization to avoid some allocations. Creating a C wrapper that don't allocate is even better.
@dagood @gdams @corhere
The text was updated successfully, but these errors were encountered: