Post Reply 
WP-34S N-Queens Benchmark Based on Patrice Torchet's BITMAP Solution
10-23-2014, 12:29 PM
Post: #20
RE: WP-34S N-Queens Benchmark Based on Patrice Torchet's BITMAP Solution
(10-21-2014 10:51 PM)patrice Wrote:  Here is an optimized code for the 15C: the algorithm is exactly the same as in the benchmark. It simply use available features more efficiently.
Code:
42,21,11    LBL A
   42 34    CLEAR REG
       8    8
   44 .0    STO .0        
   44  1    STO 1        
42, 6,.1    ISG .1        
   43  7    DEG
   44  8    STO 8
42, 6, 0    ISG 0        
   
42,21, 1    LBL 1        
   45  0    RCL 0
   44 25    STO I
           STO 9
           ISG 9
           DEG
42, 6,.1    ISG .1        

42,21, 2    LBL 2        
   45  8    RCL 8
45,30,24    RCL - (i)
   43 20    x=0?
   22  3    GTO 3        
   43 16    ABS
   45  9    RCL 9
45,30,25    RCL - I
43,30, 5    TEST 5        
   22  3    GTO 3        

42, 5,25    DSE I        
   22  2    GTO 2
42, 6, 0    ISG 0        
   43  7    DEG
   45  0    RCL 0        
   44 25    STO I
   45 .0    RCL .0
43,30, 5    TEST 5        
   22  4    GTO 4        
   
42, 4,24    X<> 8        
        STO (I)
   22  0    GTO 1

42,21, 3    LBL 3        
42, 5, 8    DSE 8        
   22  1    GTO 1
   45  0    RCL 0
   44 25    STO I
   45 24    RCL (I)
   44  8    STO 8
42, 5, 0    DSE 0        
   22  3    GTO 3
42, 5, 1    DSE 1        
42, 6, 0    ISG 0
   43  7    DEG
42, 6,.1    ISG .1        
   43  7    DEG
   22  0    GTO 1
   
42,21, 4    LBL 4        
   45 .0    RCL .0
   44 25    STO I
   43 35    CLX

42,21, 6    LBL 6        
       1    1
       0    0
      20    *
45,40,24    RCL + (I)
42, 5,25    DSE I
   22  6    GTO 6
   45 .1    RCL .1
   43 32    RTN

registres
0    line poiunter
1-8    queens
.0    Size
.1    counter

Hi Patrice, IMHO this version fulfils the requirements of being fair and accurate enough in sense of comparing the same algorithm,
whats the goal of the n-queens benchmark. Thank you for your effort and showing whats possible.

Calculator Benchmark
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
IMPROVED 30% over previous post - iceman - 10-15-2014, 06:39 PM
RE: WP-34S N-Queens Benchmark Based on Patrice Torchet's BITMAP Solution - xerxes - 10-23-2014 12:29 PM



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