Post Reply 
8-Queens Benchmark
07-10-2016, 01:15 AM (This post was last modified: 07-10-2016 05:10 PM by Paul Berger (Canada).)
Post: #18
RE: 8-Queens Benchmark
Here is the HPL program that I used, you should be able to key this in directly on a 9825, the syntax for the series 200 HPL is identical but has a couple extensions. This is no surprise as it seems the 200 series HPL was designed to help customers move from a 9825 to a series 200 system. I hope the arrows come out correctly the first line should be 8 right arrow R. The case is important so type it in exactly as shown. The right arrow would seem to be on the numeric keypad of the 9825. I didn't use an array as the manual says the "r" variables, which are like a 1 dimensional array, are faster. It does not appear that HPL has any concept of integers only real numbers. The optimizations applied reduce the run time to 7.42 seconds.

Code:

0:    8⟶R
1:   "L1":if X=R;gto "L5"
2:   X+1⟶X;R⟶rX
3:   "L2":S+1⟶S;X⟶Y
4:   "L3":Y-1⟶Y
5:   if Y=0;gto "L1"
6:   rX-rY ⟶T;if T=0;gto "L4"
7:   if X-Y<>abs(T);gto "L3"
8:   "L4":rX-1 ⟶rX;if rX;gto "L2"
9:   X-1 ⟶X;if X;gto "L4"
10: "L5":prt S
11: end

While I had the 9816 out I tried the program in version 5.1 of Workstation BASIC using integers if completes in 4.27 seconds and real variables took 6 Seconds. At one time I was told that HPL was faster than BASIC on these systems, however that does not appear to be the case. I also ran the same BASIC program on my 9920U with 12.5MHz 68010 Integer 2.32 Secs. Real 3.19 Secs. and on my 320 with 16.67MHz 68020 Integer 1.56 secs. Real 1.73. It may seem surprising that the times using real variables are slower for the 9920U and the 320 since they both have hardware floating point, however the stumbling block is likely the array indices, as it is noted in the manual that if they are real numbers they must be converted to integers before the array variable may be accessed.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
8-Queens Benchmark - Hlib - 05-23-2016, 06:08 PM
RE: 8-Queens Benchmark - xerxes - 05-24-2016, 02:28 PM
RE: 8-Queens Benchmark - Hlib - 05-27-2016, 08:14 PM
RE: 8-Queens Benchmark - Hlib - 06-25-2016, 06:39 PM
RE: 8-Queens Benchmark - xerxes - 06-26-2016, 06:47 PM
RE: 8-Queens Benchmark - mtern - 06-29-2016, 11:41 AM
RE: 8-Queens Benchmark - xerxes - 06-30-2016, 12:04 PM
RE: 8-Queens Benchmark - xerxes - 06-30-2016, 08:14 PM
RE: 8-Queens Benchmark - Accutron - 07-03-2016, 04:22 PM
RE: 8-Queens Benchmark - Accutron - 07-04-2016, 02:10 AM
RE: 8-Queens Benchmark - xerxes - 07-02-2016, 06:39 PM
RE: 8-Queens Benchmark - xerxes - 07-03-2016, 09:56 AM
RE: 8-Queens Benchmark - Paul Berger (Canada) - 07-10-2016 01:15 AM
RE: 8-Queens Benchmark - Accutron - 07-10-2016, 03:21 AM
RE: 8-Queens Benchmark - Egan Ford - 07-10-2016, 06:03 PM
RE: 8-Queens Benchmark - Accutron - 07-10-2016, 06:45 PM
RE: 8-Queens Benchmark - Accutron - 07-10-2016, 07:19 PM
RE: 8-Queens Benchmark - xerxes - 07-12-2016, 10:44 PM
RE: 8-Queens Benchmark - Accutron - 07-12-2016, 10:58 PM
RE: 8-Queens Benchmark - xerxes - 07-13-2016, 10:46 AM
RE: 8-Queens Benchmark - Accutron - 07-13-2016, 02:01 PM
RE: 8-Queens Benchmark - Jurgen Keller - 01-06-2017, 06:31 PM
RE: 8-Queens Benchmark - xerxes - 01-06-2017, 02:23 PM
RE: 8-Queens Benchmark - rprosperi - 01-06-2017, 04:00 PM
RE: 8-Queens Benchmark - xerxes - 01-07-2017, 06:56 PM
RE: 8-Queens Benchmark - Guenter Schink - 11-14-2021, 06:52 PM
RE: 8-Queens Benchmark - xerxes - 11-15-2021, 11:37 PM



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