top | item 39826735

(no title)

hardware2win | 1 year ago

It is written in other, more general "specification" called physics

Computers arent purely abstract, they exist in real world and are affected by it, so lets do not try to pretend otherwise

discuss

order

funcDropShadow|1 year ago

So according to that "specification" no optimization is allowed. Since that would almost always change the "heating behavior" of code. Therefore, it is absurd.

thfuran|1 year ago

None at all, even out of order execution. For that matter, executing the same code on different hardware is right out. Every program must be implemented on single-purpose hardware, and you can't even manufacture two of them.

lpapez|1 year ago

Yet the compiler writers care only about the language spec, and you can bet that failing to optimize this as dead code would be considered a compiler bug.

This goes not only for Java compiler, but many other languages as well.

thfuran|1 year ago

What exactly do you expect an optimizing compiler to do?

hardware2win|1 year ago

Leave code without obvious side effects alone (this is different from dead code)