Re: [PATCH] fix TASK_STOPPED vs TASK_NONINTERACTIVE interaction

From: Linus Torvalds
Date: Sun Oct 02 2005 - 22:25:16 EST




On Mon, 3 Oct 2005, Coywolf Qi Hunt wrote:
>
> The inequality comparisons are faster or faster on some CPU.
> We should use it if we can keep the order IMHO.

Which CPU are you talking about? Inequality is almost never faster than a
logical op.

Any CPU I can think of has a "and + compare against zero". x86 calls it
"test", although a regular "and" will do it too. ppc has "andi.". alpha
comparisons are against registers being zero or not, so again it's an
"and".

And there are very few ALU's that don't do logicals (they're much simpler
than an adder), although I seem to remember that the P4 was odd in that
respect (with the second ALU being limited to some strange subcases).

So I don't think that ends up being a concern in real life.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/