[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Almost OT, < and <=
> MIPS is different, not using condition codes. The only pure-comparison
> MIPS operation is <. (Not <=, not >.) Anything else you'd have to
> synthesize with a subtraction.
> Beyond cycle counting, I see op< as more primitive than op<=: one
> establishes order, while the other allows for equivalence. I would
> prefer a SORT which lets me use the most primitive predicate possible.
> On many platforms it won't matter; but on some, it may.
> Enough from me, already. Let's hear from some other voices.
> (P.S. I lied. One more from me. Wouldn't using op<= instead of op<
> complicate the implementation of STABLE-SORT? )
But wait a second, isn't
(< a b) = (not (>= a b)) = (not (<= b a))
at least on integers?
So both < and <= are the **same** machine instruction, except you have
to flip the arguments, and change the destination label, but this has no
run time "cost"...