2 ms·
Go uses the same technique[1], or a Duff's device[2] when AVX2 is unsupported. I am convinced that similar tricks are employed by almost every language runtime
by dullgiulio 9y ago
Go uses the same technique[1], or a Duff's device[2] when AVX2 is unsupported.
I am convinced that similar tricks are employed by almost every language runtime or standard library (GNU libc also does this, etc.)
[1] https://github.com/golang/go/blob/master/src/runtime/asm_amd64.s#L1530 https://github.com/golang/go/blob/master/src/runtime/asm_amd...
[2] https://en.wikipedia.org/wiki/Duff%27s_device https://en.wikipedia.org/wiki/Duff%27s_device