Comment on Why is 2 * (i * i) faster than 2 * i * i in Java?parentComments−utopcell7yGCC applies the same optimization and compiles to a single constant if overflow does not occur. To see this, you can change '1000000000' to '1000'.
Comments
GCC applies the same optimization and compiles to a single constant if overflow does not occur. To see this, you can change '1000000000' to '1000'.