Many of the cgo calls that just mutate state could be turned into pure Go calls (probably with unsafe), allowing them to be avoid the cost of cgocalls, and potentially be inlined. The majority of the cost in the bgfx-17-drawstress example is cgo overhead.
Tests should check for the expected side effects by comparing the entire internal C structure.
Many of the cgo calls that just mutate state could be turned into pure Go calls (probably with unsafe), allowing them to be avoid the cost of cgocalls, and potentially be inlined. The majority of the cost in the bgfx-17-drawstress example is cgo overhead.
Tests should check for the expected side effects by comparing the entire internal C structure.