# HP Forums

Full Version: How much faster is the HP Prime than the HP 50g ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Much faster ! I ran the same problem on the two calculators, and it took the HP 50g approximately 5 seconds to complete, whereas it was virtually instantaneous on the prime. As soon as I hit the Enter key on the Prime the answer appeared without any perceptible delay using my eyeball clock.

A brute-force un-optimized Ulam's Conjecture program (for counting how many iterations of the "3x+1 Algorithm" it takes for the input to reach 1) written in PPL runs 200 times faster on the Prime than an equivalent User RPL program on the HP 50g.

This one data point is not a statistically significant sample (don't quote me saying that Prime is always 200 times faster than the 50g), but it's a good hint that Prime is WAAAAAY faster than the 50g.

That does mean the Prime can make WAAAYYY more errors in WAAAYYY less time than the HP-50G, doesn't it?

d:-/

How much faster does the prime go through batteries?

It depends on whether it is connected to an active USB port or the AC adapter. ;)

Well... actually I'd say WAAAYYY more errors in the same time, or the same errors in WAAAYYY less time! ;)

I just wrote this short program and it takes about 4 seconds to execute with loop=100000.

```EXPORT Speed_Test(loop)
BEGIN
LOCAL I,X;
X:=0;
FOR I FROM 1 TO loop DO
X:=I;
END;
RETURN X;
END;
```

I just discovered something interesting. The runtime varies dramatically between programs run directly from the Program Catalog and when run in Home from the User Program Functions Catalog. The problem took about 4 seconds to run from the Program Catalog, but 25 seconds to run in Home, or about 6 times longer. So, it would seem that programs with long runtimes are best executed directly from the Program Catalog to minimize runtimes.

Hi Michael,

I try these and can't see any difference...

```EXPORT SPEED(loop)
LOCAL a,b:=0,c:=TICKS;
FOR a FROM 1 TO loop DO
b:=b+1
END;
PRINT();
PRINT("b="+b);
PRINT(TICKS-c)
END;
```

Launch from program editor, from home command line or from toolbox/user...around : 3920 ms for loop=100000

Sometimes my calc get slow.

When it append, it is always after going into program editor.

In this case the programs are about 2 times slower than max speed.

To get back to fast speed, I just turn Off the calc, when turn On, it is in fast mode.

The place where you launch the program doesn't matter, the only thing is not to go into the editor to keep fast mode.

Can you confirm this ?

That is interesting because my benchmark is very similar to yours, but the results are very different.

```EXPORT Speed_Test(loop)
BEGIN
LOCAL begin,end,runtime,I,X;
LOCAL c:=TICKS;
begin:=Time;
X:=0;
FOR I FROM 1 TO loop DO
X:=I;
END;
end:=Time;
runtime:=end-begin;
RETURN {runtime,TICKS-c};
END;
```

With loop=100000, I get the following results:

Run from the command line in Home = {0 0 25,25241} to {0 0 12,13225}

Run from Toolbox,User in Home = {0 0 24,25444} to {0 0 15,14923}

Run from Program editor = {0 0 4,4192}

Note that there is significant variation in the times and that the command line and toolbox user times are similar, but the Program editor time is much lower and similar to your result. Perhaps there is a difference between programs run in English and French.

Edited: 11 Nov 2013, 9:38 a.m.

Quote:
Can you confirm this ?

I do not see this behavior on mine.

An interesting thing just occurred. I was testing a program and the calculator froze up completely with no keyboard control and I was forced to do a hard reset with the button at the back of the calculator. When I ran the benchmark program again from the command line it was suddenly much faster with the initial result {0 0 3,3296}, which is the fastest time I've ever seen. I then ran it from the Program editor and got a nearly identical result of {0 0 3,3286}. So it would appear that if the times are varying a lot, then that's an alarm that something is wrong and the calculator should be reset to restore proper functionality.

Quote:
Much faster !

Does your comparison include time taken to recover from crashes, resets, memory formatting etc.?

Edit: not to mention waiting for a new one (two bricked Primes already reported).

Edit 2: it seems that bricked Prime no.3 has just been reported.