just wondering if "go" compiler uses any sort of optimization such as constant folding.
https://en.wikipedia.org/wiki/Constant_folding
searched through google but couldn't find the answer i'm looking for.
just wondering if "go" compiler uses any sort of optimization such as constant folding.
https://en.wikipedia.org/wiki/Constant_folding
searched through google but couldn't find the answer i'm looking for.
Try to write a simple program: eg.
package main
import "fmt"
func main() {
fmt.Println(12345*1000)
}
And now compile it to assembly
go tool compile -S examle.go
And now find 12345 in the result and you will have an answer.