Post Reply 
Slight n-queens benchmark speedup for Casio fx-4000P, fx-7000G, etc.
03-01-2020, 01:22 PM
Post: #2
RE: Slight n-queens benchmark speedup for Casio fx-4000P, fx-7000G, etc.
I found another big speedup: removing the Goto 3 that only jumps over a single line, and replacing it by just inverting the conditional test got the total execution time down to 00:05:20, or about a 10.4% speedup over the original.

Code:
        Mcl
        8→R
 Lbl 0  X=R⇒Goto 4
        Isz X
        R→A[X]
 Lbl 1  Isz S
        X→Y
 Lbl 2  Dsz Y Deg
        Y=0⇒Goto 0
        A[X]-A[Y
        Ans≠0⇒X-Y≠Abs Ans⇒Goto 2
 Lbl 3  Dsz A[X] Goto 1
        Dsz X Goto 3
 Lbl 4  S

I also put in the appropriate unicode arrows and not-equals, but that doesn't speed up the calculator. Wink
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Slight n-queens benchmark speedup for Casio fx-4000P, fx-7000G, etc. - Dave Britten - 03-01-2020 01:22 PM



User(s) browsing this thread: 1 Guest(s)