I suggest putting the `is_unary` branch first.  I suspect that it will be the common case.