Re:Sloc Cloc and Code Revisited – Optimizing an Already Fast...
by contravariant on Tuesday December 25, 2018 @09:12AM
(#18757474)
Is there some Go specific overhead on loops? If not, why does the author seems so obsessed with removing loops within loops?
[ Parent
| on HN ]
Re:Sloc Cloc and Code Revisited – Optimizing an Already Fast...
by jerf on Tuesday December 25, 2018 @09:34AM
(#18757560)
No, Go has about the fastest loops you could want, implemented in the obvious way at the asm level. (That is, not that Go's loops are any more extra magical fast than any other compiled language, but they are not slow as in some dynamic languages.) The focus is there because that's where you get wins, in any language.
Re:Sloc Cloc and Code Revisited – Optimizing an Already Fast...
by vanderZwan on Tuesday December 25, 2018 @11:11AM
(#18757883)
Depending on the type of loop there might be runtime boundary checks, but they can be avoided in many cases IIRC.