[Vm-dev] bitXor: is slower than - on Spur32 (MacOSX) r3684

Eliot Miranda eliot.miranda at gmail.com
Sun Apr 24 01:13:57 UTC 2016



> On Apr 23, 2016, at 5:43 PM, Levente Uzonyi <leves at caesar.elte.hu> wrote:
> 
> My guess is that it is just the JIT optimizing #- for constant argument. There's probably no such optimization for #bitXor:.

Right.

> 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