WP-34s: Speed benchmark W. Bruce Maguire II Member Posts: 180 Threads: 23 Joined: Apr 2012 04-27-2012, 06:49 PM 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. Paul Dale Posting Freak Posts: 3,229 Threads: 42 Joined: Jul 2006 04-27-2012, 06:56 PM 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 Tim Wessman Posting Freak Posts: 1,278 Threads: 44 Joined: Jul 2007 04-28-2012, 03:27 AM 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. Marcus von Cube, Germany Posting Freak Posts: 3,283 Threads: 104 Joined: Jul 2005 04-28-2012, 04:04 AM 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? Paul Dale Posting Freak Posts: 3,229 Threads: 42 Joined: Jul 2006 04-28-2012, 04:05 AM That is very fast! Is this a different CPU??? Or aren't you allowed to comment :-( - Pauli Gilles Carpentier Senior Member Posts: 468 Threads: 17 Joined: May 2011 04-28-2012, 05:50 AM :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 ? Mark Scheuern Member Posts: 70 Threads: 1 Joined: Jan 2012 04-28-2012, 08:47 AM 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. Tim Wessman Posting Freak Posts: 1,278 Threads: 44 Joined: Jul 2007 04-28-2012, 11:18 AM It is the same one that has been in there since the launch of the 39gII - a STMP3770. TW Tim Wessman Posting Freak Posts: 1,278 Threads: 44 Joined: Jul 2007 04-28-2012, 01:43 PM 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. Tim Wessman Posting Freak Posts: 1,278 Threads: 44 Joined: Jul 2007 04-28-2012, 01:56 PM 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 Marcus von Cube, Germany Posting Freak Posts: 3,283 Threads: 104 Joined: Jul 2005 04-28-2012, 03:40 PM 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. Xerxes Member Posts: 136 Threads: 7 Joined: Jun 2007 04-28-2012, 06:06 PM I'm impressed that the 39gii is even faster than the Nspire. Thank you for testing the 39gs and 39gii. Tim Wessman Posting Freak Posts: 1,278 Threads: 44 Joined: Jul 2007 04-28-2012, 09:07 PM 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 Gilles Carpentier Senior Member Posts: 468 Threads: 17 Joined: May 2011 04-29-2012, 12:16 AM "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

 Possibly Related Threads... Thread Author Replies Views Last Post [WP-34S] Unfortunate key damage with update to V3 :( svisvanatha 5 1,007 12-10-2013, 11:37 PM Last Post: Les Bell WP-34S (Emulator Program Load/Save) Barry Mead 1 553 12-09-2013, 05:29 PM Last Post: Marcus von Cube, Germany DIY HP 30b WP 34s serial flash/programming cable Richard Wahl 2 798 12-04-2013, 11:14 AM Last Post: Barry Mead 48G vs 49G+ User RPL Speed Comparison John Colvin 7 847 11-16-2013, 10:07 PM Last Post: Han WP 34S/43 ?'s Richard Berler 3 711 11-10-2013, 02:27 AM Last Post: Walter B My FrankenCulator (wp-34s) FORTIN Pascal 4 735 11-09-2013, 06:18 PM Last Post: FORTIN Pascal WP 34S Owner's Handbook Walter B 5 968 11-09-2013, 05:34 PM Last Post: Harald wp 34s overlay and programming. FORTIN Pascal 6 1,004 11-08-2013, 01:28 PM Last Post: Nick_S m.dy in display of WP-34S Harold A Climer 3 620 11-05-2013, 11:28 AM Last Post: Andrew Nikitin WP 34s : An old problem coming back Miguel Toro 2 571 11-05-2013, 03:00 AM Last Post: Marcus von Cube, Germany

Forum Jump: