4 ms·
Which is crazy, because there's always side effect like temperature, fans speed/noise, etc.
by tester756 3y ago
Which is crazy, because there's always side effect like temperature, fans speed/noise, etc.
- not2b 3y agoThat isn't what is meant by "side effect" here. A function with no side effects only modifies its local variables and returns a result. So, if we have int foo(int a, int b) { int c = bar(a); return b; } and we can see bar's body, and therefore we can determine that it has no side effects, we can optimize the call to bar away, because we can assume that it terminates and it doesn't affect the result. But if bar writes to global variables, that's a side effect. If we can't see the body of bar we have to assume that it might.
- tester756 3y agoI'm aware, but I don't agree that we should ignore "physical world" implications We got hurt by that in side-channel attacks.
- aidenn0 3y agoGoing by that rule, optimizing compilers just shouldn't exist. Optimizations will (or at least are supposed to) decrease computation, which will affect CPU temperatures.
- lmm 3y agoContrary to popular belief the C++ specification does not require conforming implementations to produce temperature, fan noise or the like.
- wyldfire 3y ago"Please just add an option to re-enable spacebar heating!" [1] [1] https://xkcd.com/1172/ https://xkcd.com/1172/