Skip to content

cgo: zero cost cgo calling #51380

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

Closed
hiqsociety opened this issue Feb 27, 2022 · 1 comment
Closed

cgo: zero cost cgo calling #51380

hiqsociety opened this issue Feb 27, 2022 · 1 comment

Comments

@hiqsociety
Copy link

sorry for asking but is there a possibility for zero cost cgo calling in future?
140ns per call is too much.
rustlang has zero cost calling c / c++ now.
just wondering if that'll be the way in future.

@gopherbot gopherbot added this to the Proposal milestone Feb 27, 2022
@ALTree ALTree changed the title proposal: affected/package: cgo, zero cost cgo calling? cgo: zero cost cgo calling Feb 27, 2022
@ALTree
Copy link
Member

ALTree commented Feb 27, 2022

If it were easy to have zero cost cgo calls, it would've been done by now. It wasn't one of Go design goals to have effortless and performant C integration, and it's not easy for a language with a runtime like Go's. Anyway, this is #9704 and #19574, closing here as a dup.

@ALTree ALTree closed this as completed Feb 27, 2022
@golang golang locked and limited conversation to collaborators Feb 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants