Hacker News new | ask | show | jobs
by ashvardanian 599 days ago
How is the latency of calling purego bindings vs cgo? The latter seems prohibitively expensive for most of my projects.
2 comments

IIRC, purego repurposes a lot of cgo machinery, so I don't think there would be much difference. For my purposes, it doesn't matter since the ML library does several seconds to minutes of work using multiple cores per call.
I haven't checked (I make maybe 10 calls per second at most). Intuitively, they should be similar.