4 ms·
> can and probably are optimizing the loop away Why do you think that, and how would it do that and still do the calculation? My timing tests showed that Go di
by benhoyt 6y ago
> can and probably are optimizing the loop away
Why do you think that, and how would it do that and still do the calculation? My timing tests showed that Go didn't optimize the loop away (if I counted to 10 billion it took about 10 times as long), and godbolt.org also shows the loop in Go's assembly output: https://www.godbolt.org/z/d38xfGYr6 https://www.godbolt.org/z/d38xfGYr6