|
|
|
|
|
by zbobet2012
473 days ago
|
|
It depends on how long the time you spend in your c function is. cgo has a substantial overhead for calling. I tend to prefer just writing ASM functions for critical path code. You can use libraries like https://github.com/mmcloughlin/avo to make it easier to write/maintain. |
|
https://go.dev/doc/asm
(I'm not suggesting, merely asking since I haven't written any assembler for Intel for 30+ years and I have never written Go assembler)