[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Apology on NCDR/NTHCDR timings

Thinking about the NCDR timings reported yesterday, I realized some
gross anomaly:  HRRZ-SOJG is two instructions per cdr, and the compiled
lisp version takes about three instructions per cdr (due to the overhead
of getting in and out of a subroutinized CDDDDR).  Trying it again, 
I must confess, sad to say, I was comparing apples and oranges - the 
compiler (with NCDR in it) has *RSET off, and the new lisp had it initially
on, so the NTHCDR loop being executed was the slow path with checking for 
list-type at each cdr.  The correct figures (in so far as the KL10 timing 
clock can be considered "correct") with *RSET off are as follows, with 
F5NCDR being an unrolling to a loop-length of 5, and F16NCDR an unrolling 
to 16.   Timings: 
   (NCDR l n)	 12.us + 1.41*<n-1>us	|compiled loop on (CDR (CDDDDR x))
   (NTHCDR n l)	  4.us + 0.93*<n-1>us	|HRRZ-SOJG
   (F5NCDR l n)	  4.us + 0.68*<n-1>us	|5 HRRZs + looping
   (F16NCDR l n)  4.us + 0.52*<n-1>us	|16 HRRZs + looping
Trial functions F5NCDR and F16NCDR can be found in MC:JONL;FNCDR LAP