3 ms·
> So if you're wondering why it's slower, it's almost certainly that the hand-written assembly is actually poorly scheduled. The assembly is slower because Go
by dvt 9y ago
> So if you're wondering why it's slower, it's almost certainly that the hand-written assembly is actually poorly scheduled.
The assembly is slower because Go doesn't inline it. The overhead is obvious when calling one-op assembly blocks[1]. The proposal to inline assembly was rejected last year[2] by Russ Cox.
[1] https://lemire.me/blog/2016/12/21/performance-overhead-when-calling-assembly-from-go/ https://lemire.me/blog/2016/12/21/performance-overhead-when-...
[2] https://github.com/golang/go/issues/17373 https://github.com/golang/go/issues/17373
- wolfgang42 9y agoThanks for the link to the issue. I was wondering why the post was talking about function call overhead instead of being able to inline it.