Skip to content
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

Question: PureGo performs Better than CGo? #202

Closed
jgardona opened this issue Jan 18, 2024 · 2 comments
Closed

Question: PureGo performs Better than CGo? #202

jgardona opened this issue Jan 18, 2024 · 2 comments

Comments

@jgardona
Copy link

Hello, good afternoon

I would like to know if purego performs nicely. Remember that using cgo, the overhead in functions was huge.

@TotallyGamerJet
Copy link
Collaborator

Purego will not out-perform Cgo because it uses the same slow mechanism for calling into C code. The reason both are slow is because of the synchronization between the C runtime and Go runtime. This can only be fixed by the Go team. Purego is likely even slower than Cgo see #172 for a suggested fix using generics. However, I'd like to see MakeFunc's performance to be improved instead of using generics.

@jgardona
Copy link
Author

Thank you.

@TotallyGamerJet TotallyGamerJet closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants