[Vm-dev] bitXor: is slower than - on Spur32 (MacOSX) r3684
Levente Uzonyi
leves at caesar.elte.hu
Sun Apr 24 00:43:57 UTC 2016
My guess is that it is just the JIT optimizing #- for constant argument.
There's probably no such optimization for #bitXor:.
There's no difference when the argument is not a constant:
| a b |
a := 1234.
b := 5678.
{
[(a bitOr: b) - b] bench.
[(a bitOr: b) bitXor: b] bench.
}
#('55,200,000 per second. 18.1 nanoseconds per run.' '55,600,000 per
second. 18 nanoseconds per run.')
Levente
More information about the Vm-dev
mailing list