For sure some of you remember the thread about the Calculator Benchmark. A legitimate criticism was not having a structured version of the test algorithm for languages without GOTO command or if slower with unstructured code. Meanwhile I have added an accurate structured version of the test using the same algorithm as the unstructured one. If a language allows both versions, you will find the faster version in the table now.
This is the accurate User RPL implementation:
<< 8. 0. 0. 0. { } -> R S X Y A
<< CLEAR TICKS
1. R START 0. NEXT R ->LIST 'A' STO
DO
'A' 'X' INCR R PUT
DO
'S' INCR DROP
X 'Y' STO
WHILE Y 1. > REPEAT
A X GET A 'Y' DECR GET -
IF DUP 0. == SWAP ABS X Y - == OR THEN
0. 'Y' STO
'A' X A X GET 1. - PUT
WHILE A X GET 0. == REPEAT
'A' 'X' DECR A X GET 1. - PUT
END
END
END
UNTIL Y 1. == END
UNTIL X R == END
TICKS SWAP - B->R 8192. /
S
>>
>>
After running the program, it returns the test value of 876 for correct executing and the time needed, if I am right that 8192 ticks are one second on all RPL calculators. The typical execution speed of the HP-50G is 90.3 seconds after 10 runnings.
It would be nice, if somebody can test a RPL calculator with other hardware.
Hardware Overview:
------------------
Saturn 0.640 MHz: HP-28C
Saturn 1 MHz: HP-28S
Saturn 2 MHz: HP-48 S/SX
Saturn 3.7-4 MHz: HP-48 G/GX/G+
Saturn 4 MHz: HP-49G
ARM9 48 MHz: HP-48GII
ARM9 75 MHz: HP-49G+ / HP-50G
Edited: 6 June 2007, 9:04 a.m.