On Sunday, 12 June 2022 at 09:16:30 UTC+1 Const V wrote:

>   go func(start, end, i int, quit chan string) {
>       BytesContainsCh1(b.Bytes(), start, end, find, ch)
>    }(start, end, i, quit)
>

I note that this could be further simplified to:

go BytesContainsCh1(b.Bytes(), start, end, find, ch)
 
Maybe the compiler does this optimisation automatically.  Does it make any 
difference to your timings?

If you want to understand the difference you might need to look at the 
assembly language generated. See what happens with the number of stack 
frames allocated, whether the unused argument 'i' is elided in one of the 
cases, and so on.

>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/fb71b45a-424a-4345-9f67-fa549db27d60n%40googlegroups.com.

Reply via email to