On Mon, Jul 10, 2017 at 3:31 PM, Francesc Campoy Flores <cam...@golang.org> wrote: > > I can confirm that the behavior only happens on Mac, tried the same on Linux > and the output contained each symbol only once. > > https://github.com/golang/go/issues/20976
Ah, sorry, reading out of order. I see that you can recreate it. Ian > On Monday, July 10, 2017 at 3:21:23 PM UTC-7, Francesc Campoy Flores wrote: >> >> Even using tip I get the same behavior, I attached the output of running >> the following command with tip >> >> go test -bench=Div -gcflags "-S" 2>& out.s >> >> goos: darwin >> >> goarch: amd64 >> >> pkg: >> github.com/campoy/go-tooling-workshop/3-dynamic-analysis/3-profiling/jic >> >> BenchmarkDiv-8 500000000 3.79 ns/op >> >> PASS >> >> ok >> github.com/campoy/go-tooling-workshop/3-dynamic-analysis/3-profiling/jic >> 2.301s >> >> >> On Monday, July 10, 2017 at 3:04:51 PM UTC-7, Francesc Campoy Flores >> wrote: >>> >>> Hi, >>> >>> I'm writing on compiler optimization and benchmarks, and one of the >>> things I do is `go test -bench=. -gcflags "-S"` >>> >>> This outputs the generated assembly, which allows me to point out when a >>> function call has ben inlined, or simply removed. >>> >>> The problem is that for this piece of code >>> https://play.golang.org/p/dGdRN_wd1i, I get two definitions for BenchmarkDiv >>> (see attached file), one that has a DIVSD instruction, the other that >>> doesnt. >>> >>> What does this mean? >>> >>> Francesc > > -- > 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. -- 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.