11 ms·
> Go does not inline range operation. do you know why? [not super familiar with Go, just curious]
by uryga 6y ago
> Go does not inline range operation.
do you know why?
[not super familiar with Go, just curious]
- Thaxll 6y agoI'm not sure I think it's just a current limitation: https://github.com/golang/go/wiki/CompilerOptimizations#function-inlining https://github.com/golang/go/wiki/CompilerOptimizations#func... They do improve the compiler every release, so we might see some of those operations get inlined in the future. More information there: https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/inl.go#L10 https://github.com/golang/go/blob/master/src/cmd/compile/int...