"Joshua Isom" <[EMAIL PROTECTED]> wrote:
I guess this is one place where being CISC really is better than being
RISC. But how much improvement with outputting to a pbc first? But a
couple notes, there's no --help-optimize like --help-debug, and as far as I
know, there's no way to disable optimizations completely, e.g. this pir
.sub main :main
$N0 = pow 2.0, 5.0
.end
Is always converted to this.
main:
set N0, 32
end
I think that doesn't class as an optimization as such, but rather a way to
avoid having to have opcodes that take two constant arguments. Over a
number of instructions, that's a worthwhile saving. Ops cost space in the
Parrot executable, which means we fit less of Parrot in the CPU caches,
which is bad.
Which can lead to misleading test results for when pow's actually broken.
Hopefully we have tests with just one constant argument to detect breakage
of this kind? It does bring out an interesting issue in so far as if we
don't promise the same behaviour for pow then you could end up with a hybrid
of the behaviour on the system the PBC was generated on and the system you
run it on, but I think we're aiming for consistent behaviour.
Jonathan