IBM Books

Engineering and Scientific Subroutine Library for AIX Version 3 Release 3: Guide and Reference


Performance and Accuracy Considerations

  1. The binary search subroutines provide better performance than the sequential search subroutines because of the nature of the searching algorithms. However, the binary search subroutines require that, before the subroutine is called, the sequence to be searched is sorted into ascending order. Therefore, if your data is already sorted, a binary search subroutine is faster. On the other hand, if your data is in random order and the number of elements being searched for is small, a sequential search subroutine is faster than doing a sort and binary search.
  2. When doing multiple invocations of the binary search subroutines, you get better overall performance from the searching algorithms by doing fewer invocations and specifying larger search element arrays for argument x.
  3. If you do not need the results provided in array RC by these subroutine, you get better performance if you do not request it. That is, specify 0 for the iopt argument.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]