# | Line 68 | Line 68 | OBJECT obj; | |
---|---|---|
68 | int upper, lower; | |
69 | register int cm, i; | |
70 | ||
71 | + | if ((i = os[0]) <= 6) { /* linear search algorithm */ |
72 | + | cm = obj; |
73 | + | while (i-- > 0) |
74 | + | if (*++os == cm) |
75 | + | return(1); |
76 | + | return(0); |
77 | + | } |
78 | lower = 1; | |
79 | < | upper = cm = os[0] + 1; |
79 | > | upper = cm = i + 1; |
80 | /* binary search algorithm */ | |
81 | while ((i = (lower + upper) >> 1) != cm) { | |
82 | cm = obj - os[i]; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |