× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> From: <David.X.Kahn@gsk.com>
> SETLL will always set the current record pointer. CHAIN will
> set it only when a record is found. If Nathan were to re-run his
> test where the record is never found I think he would find that
> the CHAINs are quicker than the SETLLs.

Apparently correct.  In this 3rd version of the program, none of the 10,000
keys tested exist in the file.  In this case the SETLL loop takes 37% more
time than the CHAIN loop.

     Ftestiol   IF   E           K DISK

      /COPY RDWEB/QRPGLESRC,RDSTRAPI#1

     D myKey           S             12A   Dim(10000)
     D i               S             10I 0
     D Now             S               Z
     D Then            S               Z
     D Secs            S             10I 0
     D myNumber        S             10I 0
     D myString        S            128A   Varying

      *-----------------------------------------------------------------

     C                   For       i = 1 to 10000
     C                   Eval      myKey(i) = strDistinct
     C                   EndFor

      *-----------------------------------------------------------------

     C                   Time                    Then
     C                   For       i = 1 to 10000
     C     myKey(i)      Setll     testiol                                70
     C                   EndFor

      *-----------------------------------------------------------------

     C                   Time                    Now
     C     Now           Subdur    Then          Secs:*MS
     C     Secs          Dsply

      *-----------------------------------------------------------------

     C                   Time                    Then
     C                   For       i = 1 to 10000
     C     myKey(i)      Chain     testior                            70
     C                   EndFor

      *-----------------------------------------------------------------

     C                   Time                    Now
     C     Now           Subdur    Then          Secs:*MS
     C     Secs          Dsply

      *-----------------------------------------------------------------

     C                   Eval      myNumber = tifld1
     C                   Eval      myNumber = tifld2
     C                   Eval      myNumber = tifld3
     C                   Eval      myNumber = tifld4
     C                   Eval      myNumber = tifld5

     C                   Eval      myString = tifld6
     C                   Eval      myString = tifld7
     C                   Eval      myString = tifld8
     C                   Eval      myString = tifld9
     C                   Eval      myString = tiflda
     C                   Eval      myString = tifldb
     C                   Eval      myString = tifldc
     C                   Eval      myString = tifldd
     C                   Eval      myString = tiflde
     C                   Eval      myString = tifldf
     C                   Eval      myString = tifldg

     C                   SetOn                                        LR
     C                   Return

Nathan M. Andelin
www.relational-data.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.