Asking for help about infinite-loop program to benchmark an HP48G+


I just bought a HP 48G+ just for collecting purposes. It looks almost new, but I am puzzled about the speed of this unit, most functions take more time than I expected (based on my HP41 and 42 experience). Perhaps it is right this way, I don’t know.

I would like to run a simple benchmark to see if this particular unit is OK or not. On a HP 41, I’d write a simple program (infinite loop) just as:

LBL 00



GTO 00

and see how many iterations took place during, say, one minute.

(In fact, on a HP 41 I would use automatic duplication of the T stack register, or use a ISG loop, but I am trying to keep this example very simple and clear)

I’ve found (as expected) that none of my programming experience in HP25, HP41, HP42 or HP32Sii is of any help. While I am prepared to work through the manuals to learn the HP 48 programming model, I would appreciate any shortcut right now! :-)

Could someone please let me know how to create and run a infinite loop program on a HP 48?

If someone knows, what speed (iterations per minute) should I expect?

Thank you in advance



Try the following for infinite loops:

/* Body of loop here */

Essentially, what's happening is that the loop will repeat for as long as 0 and 0 are the same (i.e., always).

You can use DO...UNTIL instead:

/* Body of loop here */

which will repeat the loop until 1=2 (i.e., will never stop).




A good source for HP48 programs is Using a loop yields different results depending upon the manner a value is incremented. A basic "infinite" loop is:


This doesn't count a value. You could add something after the DO before the UNTIL such as:

'A' INCR DROP assuming the variable A exists

or try a stack solution:

1 +



Thank you Ernie and Joe!


The simplest loop program (just add 1 to the x register and loop back) was run for 1 minute. The results are the number of iterations made by each model (approx):

HP 41 C: 450

HP 42 S: 1750

HP 32 Sii: 3250

HP 48 G+: 11800

I don't have the exact numbers, I am posting this here just as an order of magnitude reference.



Just for fun I tried the same loops in System RPL.

This one did about 30,000 in one minute:

 System RPL code
%0 real number 0
BEGIN begin loop
%1+ add real number 1 to item on stack
ATTN? check if ON key is pressed
UNTIL end of loop structure

While this did about 50,000:

ZERO       binary integer zero
#1+ add binary integer 1 to item on stack

I'm sure someone knowing assembly can acheive even greater performance.



As you found out that the 48 would run programs much faster than the 41 or 42. However, you did mentioned that it seemed slow for most functions. I think the 48 is slower in manual calculation because it often has to do its garbage cleaning on its very large stack.

Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime: run a program in another program Davi Ribeiro de Oliveira 6 1,710 11-11-2013, 08:28 PM
Last Post: Davi Ribeiro de Oliveira
  WP34s integration trapped in infinite loop Bernd Grubert 25 4,493 10-17-2013, 08:50 AM
Last Post: Dieter
  Yet another benchmark port on the wiki: Savage Pier Aiello 35 6,382 09-26-2013, 03:22 AM
Last Post: Pier Aiello
  A brand new calculator benchmark: "middle square method seed test" Pier Aiello 25 4,808 09-13-2013, 01:58 PM
Last Post: Pier Aiello
  New community-maintained version of "Calculators benchmark: add loop" Pier Aiello 20 4,383 09-12-2013, 02:42 AM
Last Post: Pier Aiello
  Calculator Speed Benchmark (Add Loop) Thomas Chrapkiewicz 2 933 01-20-2013, 11:24 AM
Last Post: Thomas Chrapkiewicz
  HP-IL: Using 82162A Printer and PIL-Box in Same Loop Les Wright 12 2,514 05-17-2012, 11:58 PM
Last Post: Les Wright
  HP48G Series Connectivity in a USB World Les Wright 3 1,011 05-06-2012, 01:29 AM
Last Post: Reth
  WP-34s: Speed benchmark W. Bruce Maguire II 13 2,258 04-29-2012, 12:16 AM
Last Post: Gilles Carpentier
  HP-15C LE -- endless loop in SOLVER Gerson W. Barbosa 9 1,868 10-27-2011, 02:20 PM
Last Post: Kiyoshi Akima

Forum Jump: