Re: Param ordering; < and <=
felix 22 Jul 2002 15:40 UTC
> Numerically, op< is less expensive than op<=. Assuming that a fixnum
> (lambda (x y) (< x y)) compiles to a signed-comparison sequence like
> (x86)
>
> MOV ax, [esp-4] ; y
> SUB ax, [esp-8] ; (< x y)
> JL g01
> MOV ax, BOOLEAN_T ; #t
> JMP g02
> g01:
> MOV ax, BOOLEAN_F ; #f
> g02:
>
> On the x86 and ARM, JL (BLT) tests two flag bits, whereas JLE (BLE)
> tests three. (For unsigned comparisons, JB (BCC) tests one flag bit,
> whereas JBE (BLS) tests two.)
Ahem...
Do you really think this makes a measurable difference in execution speed?
cheers,
felix