3 ms·
> There's always side-effect like CPU usage, temperature, mem usage, etc. If you are writing a loop in your code with no classic side effects hoping to regulat
by dragonwriter 3y ago
> There's always side-effect like CPU usage, temperature, mem usage, etc.
If you are writing a loop in your code with no classic side effects hoping to regulate temperature, that’s probably a bad and unreliable design to start with, whether or not the compiler optimizes it away.
If you read a temperature sensor to validate that the loop is doing the right thing and adjust frequency based on the result, its still a little crazy but its less completely insane and no longer free of classix side effects.
- tester756 3y agoAll I'm saying is that code doesn't have to perform stuff like prints, file write, http call in order to generate side effect You can run heavy computation and do not do anything with the result just in order to increase CPU usage, right? (which then should result in temp increase ;))
- tylerhou 3y agoThe C abstract machine isn't a physical machine, so temperature is not a side effect :)