Re: Another couple of practical speed tests for the 15c Message #4 Posted by Paul Berger (Canada) on 14 Oct 2011, 11:09 p.m., in response to message #3 by Chris Randle (UK)
My program is basically 4 nested loops, one loop for each digit in the number, with the thousands being the outer loop and units the inner loop. It is not completely brute force it eliminates any values wher the x^y would be greater than the value tested, this test is not perfect and does eliminate number that are potential candidates, however it does come up with the right answer, it also eliminate any 0^x values even though some schools of thought say 0^0 =1 but it was easier to ignore this. Even though I know there is only one number that fits the A^B*C^D=ABCD I go through all numbers from 0 to 9999 with the exception noted above.
The results in ascending time order are as follows:
50G SysRPL 00:01:30
15C LE RPN 00:01:39
50G UsrRPL 00:02:29
49G SysRPL 00:03:28
48GX#1 UsrRPL 00:05:58
75C Basic 00:06:21
48GX#2 UsrRPL 00:06:24
49G UsrRPL 00:06:39
71B Basic 00:08:57
28S UsrRPL 00:12:40
28C UsrRPL 00:18:20
41CV RPN 01:36:28
Things I learned from this exercise:
1. It takes a lot more statements to create a SysRPL program, you would really want to have a need for the extra speed to even bother.
2. Learning curve to get started with SysRPL is even steeper than UsrRPL and it is not as well documented.
3. I found writing UsrRPL pretty straight forward and since I have some programming experience it makes sense to me.
4. The memory in the 28C really is pitifully small I could not even save the program after editing it , there seemed to be enough free space but it would tell me there was no room.
5. Having a a powered on peripheral printer attached to a 41 has a very significant impact on the run time of a program, it appears that it keep checking the state of the switches on the printer as I could start and stop trace while it was running, a HPIL attached printer had no effect.
6. I wrote a version of the program for a TI-59, after using HP calculators for several years now, and being used to how they operated, it was painful to go back to program a TI and compared to the HP41 it took almost twice as many step to accomplish the same thing, and after 02:19:51 it failed to find the answer.
Notes:
1. I listed two 48GXs as one seems to be about 6% faster than the other, it seemed like a big variation to me.
2. Timing for the 41CV, 28C, 28S and 15C LE where measured using a stop watch, timing for all others was measured by the calculators clock.
|