The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

New community-maintained version of "Calculators benchmark: add loop"
Message #1 Posted by Pier Aiello on 10 Sept 2013, 3:11 a.m.

So, i just copied (even if is not complete) the original calculator benchmark of Gene Wright that is no more updated (1) on a wiki4hp page.

Do you know other results that weren't added to the original article? If yes, could you link me the discussion? (or could you add it directly on the wiki? (2) )

(1) The other benchmark that i known, the N-Queens, is regularly updated.

(2) Here is, for me, the power of a wiki: concentrate the efforts of multiple users on a single page and it is really useful for FAQs; articles that needs continuous updates; organization in a more usable way of preexisting contents on other sites (ex: an organized index of links); and so on without the limit of a single editor (that can become inactive).

      
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #2 Posted by nina scholz on 10 Sept 2013, 9:00 a.m.,
in response to message #1 by Pier Aiello

fresh test with hp 15c le (ordered by speed) disclaimer: stopped by hand, maybe 2 s +/-

LBL  E + GTO  E		48823
LBL 09 + GTO 09		48763
LBL  A + GTO  A		48721
LBL 01 + GTO 01		48509
LBL .9 + GTO .9		44448
LBL .1 + GTO .1		44083
            
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #3 Posted by Pier Aiello on 10 Sept 2013, 9:31 a.m.,
in response to message #2 by nina scholz

I'll add it ASAP. Thanks :)

PS: My hp50g is way slower (if i don't use HPgcc but standard userRPL) than your arm powered 15c. That's unfair!!! :P

Edited: 10 Sept 2013, 9:32 a.m.

            
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #4 Posted by Pier Aiello on 10 Sept 2013, 11:22 a.m.,
in response to message #2 by nina scholz

Added!

            
WP-34S results
Message #5 Posted by Marcel Samek on 10 Sept 2013, 12:23 p.m.,
in response to message #2 by nina scholz

With Stack depth 4

LBL'XYZ' + GTO'XYZ'		90891
LBL A    + GTO A                90675
LBL 00   + GTO 00               90369

With Stack depth 8

LBL 00   + GTO 00               78209

                  
Re: WP-34S results
Message #6 Posted by Paul Dale on 10 Sept 2013, 5:51 p.m.,
in response to message #5 by Marcel Samek

The earlier version 2 firmware will be faster than version 3.

There are lots of other possibilities for improvement BACK and INC for example. Also, integer mode might be a little faster.

- Pauli

            
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #7 Posted by Thomas Klemm on 10 Sept 2013, 1:16 p.m.,
in response to message #2 by nina scholz

Could you please try the following program:

000 +
001 x=0
Just fill the stack with 1s and hit the R/S key. For this to work all the programs have to be cleared beforehand. So I'd understand if you don't want to do that.

Another variant is to start with 0 in register I and use this program:

000 ISG I

The results are 2038 respectively 1669 using a DM-15CC.

Best regards
Thomas

PS: A false condition on the last line jumps over to the first line.

Edited: 10 Sept 2013, 1:20 p.m.

                  
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #8 Posted by Pier Aiello on 10 Sept 2013, 1:48 p.m.,
in response to message #7 by Thomas Klemm

#5 and #6 added!

PS: just register on the wiki and contribute directly!

Edited: 10 Sept 2013, 1:49 p.m.

                        
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #9 Posted by Tim Wessman on 10 Sept 2013, 4:14 p.m.,
in response to message #8 by Pier Aiello

Kind of hard since the source is locked by administrator. :-?

Prime: v2013.8.13

export LOOP()
begin
 A:=0;
 for A from 1 to 1E9 do
 end;
end;

Recall A after ON to stop running on 1 min. Average of several runs.

6.646.300

TW

Edited: 10 Sept 2013, 4:14 p.m.

                              
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #10 Posted by Thomas Klemm on 10 Sept 2013, 5:22 p.m.,
in response to message #9 by Tim Wessman

Reminds me of The Evolution of a Programmer.

                              
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #11 Posted by Pier Aiello on 10 Sept 2013, 6:37 p.m.,
in response to message #9 by Tim Wessman

Thanks! (Added)

About editor status, i get it in minutes but i agree, a wiki should be quite open, indeed i create this wiki talk: here

I hope that the admin will ad some new moderators ASAP.

                              
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #12 Posted by Gilles Carpentier on 11 Sept 2013, 3:16 p.m.,
in response to message #9 by Tim Wessman

This version (same to the PRIME version) is faster on the HP39GII than a A+1->A version published

EXPORT LOOP()
BEGIN
 A:=0;
 FOR A FROM 1 TO 1E9 DO END;
END;
-> 1062108 loop in 60 sec

The prime is 6.25 x faster

Edited: 11 Sept 2013, 3:20 p.m.

                                    
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #13 Posted by Pier Aiello on 11 Sept 2013, 3:35 p.m.,
in response to message #12 by Gilles Carpentier

Thanks! Indeed for loops are faster in general :)

Edited: 11 Sept 2013, 3:37 p.m.

                                          
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #14 Posted by Gilles Carpentier on 12 Sept 2013, 7:24 a.m.,
in response to message #13 by Pier Aiello

By the way, the A:=0 line can be deleted :

EXPORT LOOP()
BEGIN
 // A:=0; 
 FOR A FROM 1 TO 1E9 DO END;
END;

But this change nothing

                  
HP 15C LE
Message #15 Posted by nina scholz on 10 Sept 2013, 1:59 p.m.,
in response to message #7 by Thomas Klemm

+ x=0?		59006 or 59182
ISG 00		41062 or 41048
ISG  I		40746
ISG .9		40922

ps: thanks, i did't know.

                        
Re: HP 15C LE
Message #16 Posted by Pier Aiello on 10 Sept 2013, 6:37 p.m.,
in response to message #15 by nina scholz

added :)

      
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #17 Posted by Thomas Klemm on 10 Sept 2013, 5:46 p.m.,
in response to message #1 by Pier Aiello

Don't know whether that counts but it was fun to do.
Odhner Count: 251.
I can hardly believe that I was faster than a HP-67.

Cheers
Thomas

            
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #18 Posted by Pier Aiello on 10 Sept 2013, 6:38 p.m.,
in response to message #17 by Thomas Klemm

Sure it counts!

And, this time, i think that emulators can have their list. So if you have an emulator, use it!

      
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #19 Posted by Pier Aiello on 11 Sept 2013, 11:04 a.m.,
in response to message #1 by Pier Aiello

I have added new, and updated, results found on MoHPC :)

- Some TI performs better with a for loop
- 39gII results
- a 30b with crystals.

Edited: 11 Sept 2013, 11:36 a.m.

      
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #20 Posted by Marcel Samek on 12 Sept 2013, 12:40 a.m.,
in response to message #1 by Pier Aiello

I was playing around with this on the WP-34S and could see that how one codes the loop makes a big difference.

If you run two tests, one with one addition inside the loop, and the second with two additions inside the same loop, then it is possible to deduce the cost of the loop and figure out just the cost of the addition operation.

I ran some experiments on the WP-34S to see how consistent this was. I ran a loop with 1,2,3,4,5, and 6 additions inside it and the cost of the loop was consistent.

When one takes this approach, it turns out that the setup code and the loop can be as complex as need be in order to set up the benchmark of the individual operation. Thus, for multiplication or division, one can make sure the stack is set up with valid numbers. The multiple tests will hide the cost of the setup/loop.

I ran six tests to benchmark addition, and multiplication on the WP-34S. You can see that the average result is that the calculator can do 2428 additions per second and 2422 multiplications per second.

Here is the spreadsheet with my numbers and calculations:

Spreadsheet with results (LibreOffice/OpenOffice)

I would find it interesting to use this kind of approach to compare the most common operations on all the calculators to get an idea of their relative speed. I have played with different modes on the WP-34S and can see the difference they make.

I will continue to benchmark the WP-34S instructions in different modes and will post the results in the next few days.

            
Re: New community-maintained version of "Calculators benchmark: add loop"
Message #21 Posted by Pier Aiello on 12 Sept 2013, 2:42 a.m.,
in response to message #20 by Marcel Samek

Nice idea! (and it is much more consistent to compare calculators on four operations)

Could you setup a wiki page (or an article) about this to store the results? Thanks :)


[ Return to Index | Top of Index ]

Go back to the main exhibit hall