× 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>
> Nathan wrote:
>
> >> Why not use a CHAIN?
> >
> > You took the first thought that came to my mind and put it into
> > words <smile>.  Or, why not use SETLL for better performance?
>
> Because it's a fallacy. :-)
>
> Dave...

I wrote the following program to test CHAIN vs. SETLL.  It did surprise me
that CHAIN took only 13% more time.  That's not much difference.  Thank you
for pointing out the not-so-obvious.

     Ftestio    IF   E           K DISK

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

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

     C                   For       i = 1 to 10000
     C                   Read      testior
     C                   Eval      myKey(i) = tikey
     C                   EndFor

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

     C                   Time                    Then
     C                   For       i = 1 to 10000
     C     myKey(i)      Setll     testio                                 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                   SetOn                                        LR
     C                   Return

Nathan M. Andelin
www.relational-data.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.