3 ms·
How is the latency of calling purego bindings vs cgo? The latter seems prohibitively expensive for most of my projects.
by ashvardanian 2y ago
How is the latency of calling purego bindings vs cgo? The latter seems prohibitively expensive for most of my projects.
- cyberax 2y agoI haven't checked (I make maybe 10 calls per second at most). Intuitively, they should be similar.
- biomcgary 2y agoIIRC, 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.