2 ms·
Not giving you nice things because "Your average programmer may mess that up" is the whole philosophy of Go though
by anentropic 3y ago
Not giving you nice things because "Your average programmer may mess that up" is the whole philosophy of Go though
- smcl 3y agoYeah I know they don't tend to want to just hand you over low-level access, like an `asm(...)` statement in C (or maybe like instrinsics). But pragmas tend to be a bit less explicitly "mess it up". Like in the case we're talking about, a loop performs slightly worse by default and it might be nice to nudge the compiler into the right direction. Just as go isn't "messing [it] up" by selecting a slightly suboptimal instruction here, you're not "messing [it] up" if you annotate a loop slightly incorrectly.