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

Re: (tak ...) benchmark



    I just ran the following code in t2.8,
    
        (define (tak x y z)
          (lables
              (((tak1 x y z)
                   (if (not (< y x) z
                       (block
                           (tak1 (tak1 (fx- x 1) y z)
                                 (tak1 (fx- y 1) z x)
                                 (tak1 (fx- z 1) x y)))))))
              (tak1 x y z)))
    
    and got the following results for
    
            (tak 18 12 6)
    
      Dn300         16.5 seconds
      Dn460          8.8 seconds
    
    Can anyone explain why these results are so much worse that the
    ones published on AI-List.
    
If this is indeed the code you ran, barring the the typos ("lables"
and missing parenthesis after the "not"), then one major fix is to
change the "<" to "fx<".  It cut my informal test times by more than
half.