glfw icon indicating copy to clipboard operation
glfw copied to clipboard

v3.3/glfw: Annotate functions with #cgo noescape/nocallback where possible

Open Jacalz opened this issue 10 months ago • 2 comments

Go 1.24 is supposed to be releasing any day now and it includes support for new two new annotations #cgo noescape and #cgo nocallback (see https://tip.golang.org/doc/go1.24#cgo).

I'm not sure to which degree these are relevant for us but if they are, then we should likely be able to squeeze a but more performance out of the package.

Jacalz avatar Feb 05 '25 22:02 Jacalz

Yeah, it’s interesting how much that can help here. We’ll need some measurements to evaluate and decide.

Somewhat separately, it’d be good if we can help land v3.4, and target such enhancements there instead of the older v3.3.

dmitshur avatar Feb 05 '25 23:02 dmitshur

Indeed, yeah. Depending on when v3.4 is readily available here, we might want to try it out in v3.3 first :)

Jacalz avatar Feb 06 '25 07:02 Jacalz