[go-nuts] Avoiding function call overhead in packages with go+asm implementations

2016-11-18 Thread Damian Gryski
This is one of those tricks that should be in a "best practices for writing asm with Go" document. Maybe we should start one on the wiki? Including things like "common build tags for disabling asm" and the like. Damian -- You received this message because you are subscribed to the Google

Re: [go-nuts] Avoiding function call overhead in packages with go+asm implementations

2016-11-18 Thread Aram Hăvărneanu
On Fri, Nov 18, 2016 at 4:41 AM, Caleb Spare wrote: > Aram gave me the idea of using //go:linkname as a hacky workaround; > this doesn't work within a single package What do you mean exactly? It works here, in fact, I use this. -- Aram Hăvărneanu -- You received this

[go-nuts] Avoiding function call overhead in packages with go+asm implementations

2016-11-17 Thread Caleb Spare
I've run into an annoying problem. I'm not sure if there's a solution I've overlooked and I'm hoping you folks have some ideas for me. I have a library that provides a function Sum64(b []byte) uint64. I have both asm and pure-go implementations of this function, and I want both to be as fast as