function: func test3(a int) int { return a * 3 + 4 } go version go1.13.5 darwin/amd64 generate instructions: LEAQ (AX)(AX*2), AX LEAQ 4(AX), AX
As far as i known,there a better choice LEAQ 4(AX*3), AX Can it be optimized? -- 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/5b1a4e3b-047b-4ffa-a255-208b0ff23579n%40googlegroups.com.