On Thu, Jul 18, 2013 at 7:45 AM, Nick Craig-Wood wrote:
I've noticed that re-writing functions in assembler seems to disable
Go's escape analysis.
In the particular example I'm working on that causes go to allocate
objects on the heap rather than the stack in the calling Go function
which for some test cases outweighs the goodness of converting the
called function to assembler!
To be specific in the below g() has been converted to assembler. That
seems to force f() to allocate `data` on the heap rather than the stack
like it used to when g() was in Go.
func f() {
var data [64]byte
g(data)
}
Any ideas on how to get round this?
Thanks
Nick
--
Nick Craig-Wood <nick@craig-wood.com> -- http://www.craig-wood.com/nick
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--I've noticed that re-writing functions in assembler seems to disable
Go's escape analysis.
In the particular example I'm working on that causes go to allocate
objects on the heap rather than the stack in the calling Go function
which for some test cases outweighs the goodness of converting the
called function to assembler!
To be specific in the below g() has been converted to assembler. That
seems to force f() to allocate `data` on the heap rather than the stack
like it used to when g() was in Go.
func f() {
var data [64]byte
g(data)
}
Any ideas on how to get round this?
Thanks
Nick
--
Nick Craig-Wood <nick@craig-wood.com> -- http://www.craig-wood.com/nick
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.