× 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: Joe Pluta
> 
> > From: Booth Martin
> >
> > My experience with readE is that its a pig.
> 
> You're saying that coding READ with an HLL equals comparison in your
> loop runs faster than a READE?

WOW.  I am absolutely floored.  With a single-field key, READ/compare is
about 10% faster than READE.  Who'd'a thunk?

Code below.  SCCIR is a keyed physical file with four fields, two of
which are keys.  The file has 69000 records, of which some 2700 are
matched by the key specified in the program.  Results, 22825 msec for
the READE, 20027 for the READ, a reduction of 13 or 14 percent
(depending on your calculation).

I then changed it for a key with far fewer hits (12) and increased the
loops to 1000, and the decrease was even more dramatic - over 30%.

The program was compiled with all debug information and no optimization.
You may want to change those settings if you want to try this on your
own.


FSCCIR     IF   E           K DISK                    
                                                      
Dtime1            s               z                   
Dtime2            s               z                   
Dtime3            s               z                   
Dx                s             10u 0                 
Dd1               s             10u 0                 
Dd2               s             10u 0                 
Dmsg              s             50                    
                                                      
DLOOPS            c                   100             
                                                      
Did               s              8    inz('DF000135') 
                                                      
C     key           klist                             
C                   kfld                    id        
                                                            
C                   TIME                    TIME1           
C                   do        LOOPS                         
C     key           SETLL     sccir                         
C     key           reade     sccir                         
C                   dow       not %eof(sccir)               
C     key           reade     sccir                         
C                   enddo                                   
C                   enddo                                   
                                                            
C                   TIME                    TIME2           
C                   do        LOOPS                         
C     key           SETLL     sccir                         
C                   read      sccir                         
C                   dow       not %eof(sccir) and irid = id 
C                   read      sccir                         
C                   enddo                                   
C                   enddo                                  
                                                           
c                   time                    time3          
c     time2         subdur    time1         d1:*ms         
c     time3         subdur    time2         d2:*ms         
c                   div       1000          d1             
c                   div       1000          d2             
c                   eval      msg = 'D1: ' + %char(d1) +   
c                                   ', D2: ' + %char(d2)   
c     msg           dsply                                  
C                   eval      *inlr = *on                  


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.