R
Roedy Green
If the claim is "compile the fastest code you possibly get in C and
Java" then yes you are right, but then you are discussing which language
has come further along in their development of optimised code.
Sort of like comparing a Ferrari to a Koenigsegg car.
It is another matter to do a test, but limit what one language can use
and dont limit what another language can use. One car must be a Ford
Mondeo or similar, but the other car can be a Ferrari or similar if it
wants. Then you are not comparing speeds of comparable items.
If you introduce handicaps, YOU are rigging the outcome. You are not
really measuring anything objective. You are tricking people into
accepting your test as an objective measure of merit.
What counts is which performs best in the real world. Your job is to
make the test as reflective as possible of the real world, not to make
decisions on which optimisation techniques count as valid, unless for
some reason a technique could not actually be used in the real world.
That is why, for example, you make the tests add and print results so
the optimiser can't discard code in the test, which it could not do in
the real world. You do that by making the test more realistic, not by
disqualifying an optimiser.
..