More N-Queens benchmark results



#3

I stumbled across this http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=700 from a recent post and thought I'd contribute a few more results. I am unsure who tracks/updates this list.

71B/FORTH (about 3x faster than 71B/BASIC, faster than 50g UserRPL):

Output:

S=876 IN 46.27 SEC

Code:

: NQUEENSF ;

FVARIABLE TIMER

: STARTTIMER CLOCK TIMER STO ;
: DISPLAYTIMER CLOCK TIMER RCL F- STD F. ." SEC" ;

8 CONSTANT RR
VARIABLE SS
VARIABLE XX
VARIABLE YY
CREATE AA RR 1 + ALLOT

: RCLAA @ 2 * AA + C@ ;
: STOAA @ 2 * AA + C! ;

: NQCORE
0 SS !
0 XX !
BEGIN
1 XX +! RR XX STOAA
BEGIN
1 SS +!
XX @ YY !
BEGIN YY @ 1 > WHILE
-1 YY +!
XX RCLAA YY RCLAA - DUP
0 = SWAP ABS XX @ YY @ - = OR IF
0 YY !
BEGIN XX RCLAA 1 - DUP XX STOAA 0 = WHILE
-1 XX +!
REPEAT
THEN
REPEAT
YY @ 1 = UNTIL
RR XX @ = UNTIL
;

: NQUEENS
STARTTIMER
NQCORE
." S=" SS @ . ." IN "
DISPLAYTIMER CR
;

71B/RPN (HP41 emulator, about 4x faster than 41CX):

Output:

S=876 IN 269.87 SEC

Code:

LBL "NQ41"
FIX 0
CLRG
TIME
HR
STO 12
8
STO 11
LBL 00
RCL 00
RCL 11
X=Y?
GTO 04
ISG 00
DEG
STO IND 00
LBL 01
ISG 10
DEG
RCL 00
STO 09
LBL 02
DSE 09
DEG
RCL 09
X=0?
GTO 00
RCL IND 00
RCL IND 09
-
X=0?
GTO 03
ABS
RCL 00
RCL 09
-
X#Y?
GTO 02
LBL 03
DSE IND 00
GTO 01
DSE 00
GTO 03
LBL 04
"S="
ARCL 10
"} IN "
TIME
HR
RCL 12
-
3600
*
FIX 02
ARCL X
"} SEC"
AVIEW
RTN


#4

Thank you for testing. The list was updated with your interesting results.


Possibly Related Threads...
Thread Author Replies Views Last Post
  hp prime - sending program results to the stack giancarlo 6 535 10-15-2013, 02:00 AM
Last Post: Giancarlo
  HP Prime complex results Javier Goizueta 0 206 10-06-2013, 12:59 PM
Last Post: Javier Goizueta
  HP Prime Solving Nonlinear System of Equations for Complex Results Helge Gabert 11 908 09-30-2013, 03:44 AM
Last Post: From Hong Kong
  Yet another benchmark port on the wiki: Savage Pier Aiello 35 2,053 09-26-2013, 03:22 AM
Last Post: Pier Aiello
  A brand new calculator benchmark: "middle square method seed test" Pier Aiello 25 1,500 09-13-2013, 01:58 PM
Last Post: Pier Aiello
  New community-maintained version of "Calculators benchmark: add loop" Pier Aiello 20 1,313 09-12-2013, 02:42 AM
Last Post: Pier Aiello
  Calculator Speed Benchmark (Add Loop) Thomas Chrapkiewicz 2 331 01-20-2013, 11:24 AM
Last Post: Thomas Chrapkiewicz
  WP-34s: Speed benchmark W. Bruce Maguire II 13 756 04-29-2012, 12:16 AM
Last Post: Gilles Carpentier
  30B TVM slightly different results bill platt 5 377 03-26-2012, 11:21 AM
Last Post: bill platt
  Complex results acceptance 32sII/33s/35s Matt Agajanian 9 504 03-24-2012, 09:30 AM
Last Post: Dieter

Forum Jump: