The Museum of HP Calculators

HP Forum Archive 21

 WP-34s: Speed benchmarkMessage #1 Posted by W. Bruce Maguire II on 27 Apr 2012, 6:49 p.m. Hi all, Today, I happened to stumble on a page of the MoHPC that I had never seen before: the Benchmark Results page (MoHPC Benchmark Results). Considering that it was a quick test, I just *had* to try-out the benchmark code on my WP-34s! ;-) I followed the rules, and stayed as close to the original/pseudo-code as possible (no recall arithmetic, no 'back'). This is what I got: ``` Math/overhead: 6911 /679*100 = 1018 Trigonometry: 240 /40*100 = 600 Speed/US\$: (2*1018+600)/75 = 3515 (assumes \$75 price) ``` For comparison, the two best scores on the MoHPC page (through HP-49G+) for each test are: ``` Math/overhead: HP-9825A (977), HP-49G+ (643) Trigonometry: HP-49G+ (2535), HP-48G (1350) [SysRPL] Speed/US\$: HP-49G+ (2171), HP-48G (1276) [SysRPL] ``` And based on a quote from the MoHPC Benchmark page: Quote: The trigonometric algorithms in the handhelds appeared to be more efficient than the those used in the desktops but the desktops calculated trig functions accurate to 12 digits vs. 9 for the early handhelds. On the HP-67/97 handheld accuracy improved to 10 digits and on the HP-41C and RPL calculators, handheld accuracy was comparable to the desktops.... The recent handhelds have plenty of horsepower as evidenced by the trigonometric test, but they also have more overhead with larger screens, multiple data types, unlimited stacks, etc. As a result the math results are not as impressive because they spend proportionately more time on overhead. I would observe: (1) the WP-34s's Trig benchmark is not as impressive because it is computing the values to *much* higher accuracy, (2) the WP-34s screams in the Math/Overhead benchmark, and (3) the WP-34s is an *unmatched* powerhouse of speed and capability for a very, very small price! (I used \$75, but you could fairly use a price of \$21 + \$6 + 6\$ = \$33 for your HP-30b + cable + overlay!) I love my WP-34s! ;-) Have a good weekend, Bruce.

 Re: WP-34s: Speed benchmarkMessage #2 Posted by Paul Dale on 27 Apr 2012, 6:56 p.m.,in response to message #1 by W. Bruce Maguire II The 34S is calculating the trig functions until convergence -- 39 digits stable in the series expansion. This is a bit more than the fifteen used in the 12 digit devices :-) There is also a lot of space saving measures going on behind the scenes that are costing performance. Still, I think it is respectable. - Pauli

 Re: WP-34s: Speed benchmarkMessage #3 Posted by Tim Wessman on 28 Apr 2012, 3:27 a.m.,in response to message #2 by Paul Dale Definitely very respectable. :-) I'll throw in my own OT score for the firmware running on the 39gII in front of me here (just can't help myself), and a few more for some of the other speed tests. This is actually the first time I'd ever seen this particular speed test. Math: 82124/679*100 = 12095 Trig: 15062/40*100 = 37655 Sp/\$: (2*12095+37655)/80*100 = 77306 Two others - NQueens: 1.35s Addition loop: 680,000 or so I would observe: (1) 'Tis my new baby :-) (move aside 10bII+) TW Edited: 28 Apr 2012, 3:38 a.m.

 Re: WP-34s: Speed benchmarkMessage #4 Posted by Marcus von Cube, Germany on 28 Apr 2012, 4:04 a.m.,in response to message #3 by Tim Wessman Tim, impressive! I assume these figures are not too far from what an unmodified 30b will be capable of. It uses the same algorithms and should just fare similar if we take the differing operating frequencies into account. Someone willing to try it out?

 Re: WP-34s: Speed benchmarkMessage #5 Posted by Mark Scheuern on 28 Apr 2012, 8:47 a.m.,in response to message #4 by Marcus von Cube, Germany On my 30b: Math: 5860/679*100 = 863 Trig: 10608/40*100 = 26520 Sp/\$: (2*5860+10608)/40*100 = 55820 Edited: 28 Apr 2012, 8:48 a.m.

 Re: WP-34s: Speed benchmarkMessage #6 Posted by Tim Wessman on 28 Apr 2012, 1:56 p.m.,in response to message #4 by Marcus von Cube, Germany The speed on this processor isn't controlled directly. Basically, you give it an allowable max upper limit and it tends to fluctuate up to that. The speed is approximately in the 70Mhz range most of the time from what we can tell. Any higher and the built in RAM in no longer synchronous. TW

 Re: WP-34s: Speed benchmarkMessage #7 Posted by Marcus von Cube, Germany on 28 Apr 2012, 3:40 p.m.,in response to message #6 by Tim Wessman It's not easy to find the processor data sheet. Freescale seems to have discontinued the series and does not offer any in depth documentation on their site, at least not in an easy to find location. I just found a comparison sheet of the TSMP series.

 Re: WP-34s: Speed benchmarkMessage #8 Posted by Paul Dale on 28 Apr 2012, 4:05 a.m.,in response to message #3 by Tim Wessman That is very fast! Is this a different CPU??? Or aren't you allowed to comment :-( - Pauli

 Re: WP-34s: Speed benchmarkMessage #9 Posted by Tim Wessman on 28 Apr 2012, 11:18 a.m.,in response to message #8 by Paul Dale It is the same one that has been in there since the launch of the 39gII - a STMP3770. TW

 Re: WP-34s: Speed benchmarkMessage #10 Posted by Gilles Carpentier on 28 Apr 2012, 5:50 a.m.,in response to message #3 by Tim Wessman :D It is very fast ! Much faster than a 50G with user RPL (66x for the n queens puzzle, 15 or 20x for others ) But what language did you use for your 39GII benchmark ? Could you give the sources of your programs ?

 [OT] Re: WP-34s: Speed benchmarkMessage #11 Posted by Tim Wessman on 28 Apr 2012, 1:43 p.m.,in response to message #10 by Gilles Carpentier Hmm... hopefully I didn't screw anything up so I will look foolish. It was 1:30 am my time. :-| I retested with the exact source I have below just to make it as consistent as possible. Timing was done using 'Time()' as the input where a time was required, and done using a check against the execution value where a manual stop was required. The programming language on the 39gII is definitely an algebraic style language, but there is definitely influences from other places. It should be very easy and readable for just about anyone. The NQueens was kept identical to the old "39gs" program basically as I wanted a comparison (~5m06s for those interested IIRC). I suspect it would go faster if modified to be a better structure. ```EXPORT NQUEENS() BEGIN R:=8; L1:=MAKELIST(0,X,1,R,1); S:=0; X:=0; REPEAT X:=X+1; L1(X):=R; REPEAT S:=S+1; Y:=X; WHILE Y>1 DO Y:=Y-1; T:=L1(X)-L1(Y); IF T==0 OR X-Y==ABS(T) THEN Y:=0; L1(X):=L1(X)-1; WHILE L1(X)==0 DO X:=X-1; L1(X):=L1(X)-1; END; END; END; UNTIL Y==1 END; UNTIL X==R END; S; END; ``` The addition loop can be done like this, (stopped at 1 min with ON/C). ```EXPORT ADDLOOP() BEGIN A:=0; REPEAT A:=A+1; UNTIL 0; END; ``` Math test and trig test have 'wonderful' algebraic nesting... :-( ```EXPORT MATHTEST(a) BEGIN T:=Ticks+1000*a; N:=0; A:=1012340; B:=2.345; REPEAT SQRT(((((A*B)-B)/A)*B)/3.5); N:N+1; UNTIL Ticks>T; N; END; EXPORT TRIGTEST(a) BEGIN T:=Ticks+1000*a; N:=0; REPEAT e^LN(ATAN(TAN(ACOS(COS(ASIN(SIN(56.26))))))); N:N+1; UNTIL Ticks>T; N; END; ``` Also, I believe I was remembering the loop test value incorrectly last night. I am seeing around 640,000 right now after several runs. With these exact sources, I get these results after 5 runs averaged. I assumed radians mode. Degree mode loses about 100 or so over a minute. ```Math: 85389/679*100 = 12576 Trig: 15198/40*100 = 37995 Sp/\$: (2*12576+37995)/80*100 = 78934 Addition Loop Test: ~640,000 NQueens: 1.32s ``` TW Edited: 28 Apr 2012, 1:48 p.m.

 Re: [OT] Re: WP-34s: Speed benchmarkMessage #12 Posted by Xerxes on 28 Apr 2012, 6:06 p.m.,in response to message #11 by Tim Wessman I'm impressed that the 39gii is even faster than the Nspire. Thank you for testing the 39gs and 39gii.

 Re: [OT] Re: WP-34s: Speed benchmarkMessage #13 Posted by Tim Wessman on 28 Apr 2012, 9:07 p.m.,in response to message #12 by Xerxes Well, I didn't actually test the 39gs. That is the result from the 40gs in your chart, which is the same unit in my mind. There should be no difference between them in the programming execution speed. TW

 Re: [OT] Re: WP-34s: Speed benchmarkMessage #14 Posted by Gilles Carpentier on 29 Apr 2012, 12:16 a.m.,in response to message #11 by Tim Wessman "The programming language on the 39gII is definitely an algebraic style language, but there is definitely influences from other places. It should be very easy and readable for just about anyone." As a Pascal programmer,I like it. Very clear and readable (" there is definitely influences from other places" : Modula and Oberon ? ) I always loved Pascal, because it has a very logical syntax and can be compiled in one pass only. Those who have worked with big projects in C or Pascal (Delphi) can understand. Time compilation is much faster in Pascal (but i dont work in C since long time so perhaps compilers are now betters) EDIT 2 : The 39GII programs are (without variables declarations and MAKELIST) exactly like in Modula or Oberon. There are only an (unnecesary ?) END; after the UNTIL (copy mistake ?) And the == which is = in modula/oberon What are the N; or S; without command in the programs ? Just to "push" the results in the "history" (kind of stack)? EDIT 1 : here is an HP Pascal version wich need more BEGIN/END statement unlike Modula ```Program NQueens; Uses SystemHP,MathsHP_49; VAR R,S,X,Y, T : Integer; L1 : Array [1..8] of Integer; BEGIN R:=8; S:=0; X:=0; REPEAT X:=X+1; L1[X]:=R; REPEAT S:=S+1; Y:=X; WHILE Y>1 DO BEGIN Y:=Y-1; T:=L1[X]-L1[Y]; IF T=0 OR X-Y=T OR Y-X=T THEN BEGIN Y:=0; L1[X]:=L1[X]-1; WHILE L1[X]=0 DO BEGIN X:=X-1; L1[X]:=L1[X]-1; END; END; END; UNTIL Y=1; UNTIL X=R; END. ``` 0.895 sec 928 Bytes There is a bug in HPPASCAL with ABS on integer. compilation give : ```function Abs (x: integer): integer; begin asm A=R1 D1=A D1=D1+ 5 A=DAT1 A D1=D1- 5 LC(5) #7FFFF ?A Instruction inconnue dans "?A

Go back to the main exhibit hall