qiulaidongfeng, -gcflags=-m=2
peter On Tuesday, March 12, 2024 at 7:06:21 AM UTC-4 qiulaidongfeng wrote: > For the following code > > > https://go.dev/play/p/ynn7ihKXrp0?v=gotip > > > I got the benchmark > > > BenchmarkBelow3-16 9523 147772 ns/op 17 B/op 2 allocs/op > > BenchmarkBelow3direct-16 10000 107335 ns/op 0 B/op 0 allocs/op > > > range-over-func has two more alloc than direct-call-func. > > > Why? > -- 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/b8e8b29f-1363-4a43-8be1-b28e7d20385en%40googlegroups.com.