Duncan Lissett wrote: >>* precompile the isHeldOrSuspended? expression (this gives the >>largest speed gain) >> >> > >If we convert those boolean conditions to a table lookup then we >should do the same in the other language implementations - so although >it's a nice optimization I haven't used it. > > How about changing (@state & 0b100) != 0 || @state == 0b10 to @state == 0b10 || (@state & 0b100) != 0 instead? That shows a 4% gain in overall speed here. Enough to get below 100? ;) Also, though I think the ternary operator is actually more readable than an "if" in assignments, using it in WorkerTask#run only improved the time by 0.5% - probably well within the standard deviation.