[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: slug@ai.sri.com*Subject*: 3-way arithmetic IF*From*: kddlab!atr-la.atr.co.jp!myers@uunet.UU.NET (John K. Myers)*Date*: Thu, 1 Aug 1991 02:19:19 -0400

I need to compare two integers x and y, and perform routine 1 if x<y, routine 2 if x=y, and routine 3 if x>y. X and Y are bignums on the order of six words long. The operation must be as fast as possible. Testing x<y takes about 85-95 microseconds; testing x=y takes about 79-83 microseconds; total worst-case time of about 178 microseconds. Evaluating (signum (- x y)) takes about 175 microseconds. Question: Is there a low-level arithmetic IF somewhere down in the guts of the machine, that supports a single </=/> comparison between two numbers and then switches control three ways accordingly? [Disclaimer: Times aren't official, and the decimal could be off.] John Myers~~

**Follow-Ups**:**3-way arithmetic IF***From:*barmar@Think.COM (Barry Margolin)

- Prev by Date:
**Symbolics (or is it ILA?) C environment** - Next by Date:
**Lisp Users Group Conference** - Previous by thread:
**Symbolics (or is it ILA?) C environment** - Next by thread:
**3-way arithmetic IF** - Index(es):