Skip to content

Add cgo hints to reduce overhead of certain cgo calls - #106

Open
jfantinhardesty wants to merge 4 commits into
winfsp:masterfrom
jfantinhardesty:feature/add-cgo-hints
Open

jfantinhardesty wants to merge 4 commits into
winfsp:masterfrom
jfantinhardesty:feature/add-cgo-hints

Conversation

@jfantinhardesty

Copy link
Copy Markdown

This uses cgo features introduced in go 1.24 which allows go to optimize some of the cgo calls by noting that those functions do not call back to go code and if the go pointers do not escape the C function. Is some testing with our FUSE filesystem, we find that this improves performance from 2%-10% (though most improvements are closer to 2%). Some read directory heavy workloads see a larger improvement with these changes.

This does require bumping the go version to 1.24, but this should be fine as 1.24 is EOL anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant