Why does it slow down the code if its not inlined? Since the method is on a pointer struct I assume it wouldn't need to copy anything?
I'd like to not use inlining because I need the code of this function to be used by two different functions and would rather not have to update the code twice each time its needed. Thanks for the io.Writer idea, I'll look into that! On Sunday, October 8, 2017 at 7:26:58 AM UTC-5, Uli Kunitz wrote: > > A function call per input byte will slow your code down unless the > function is inlined. The for loop is quite simple so I wonder why you want > to separate it. You should also think about whether you want to replace the > process method by a Write method, making your object an io.Writer and much > more universal. > > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.