Post Reply 
Informal Benchmark HW C vs HW D
10-04-2018, 10:21 AM (This post was last modified: 10-04-2018 10:23 AM by toml_12953.)
Post: #1
Informal Benchmark HW C vs HW D
I finally got my Prime G2. Thanks, De Rekenwinkel!

Of course, I had to benchmark the new hardware. I installed the proper beta firmware on both calculators and ran the following program:

PHP Code:
EXPORT HAT()
BEGIN 
LOCAL XP
,XR,YP,YR,ZP,XF,YF,ZF;
LOCAL ZI,ZT,XL,XI,XT,YY,X1,Y1;
LOCAL ZZ,XX;
RECT_P(0);
P:=160Q:=120;
XP:=144XR:=1.5*PI;
YP:=56YR:=1ZP:=64;
XF:=XR/XPYF:=YP/YRZF:=XR/ZP;
FOR 
ZI:=-Q TO Q-DO
   IF 
ZI >= -ZP AND ZI <= ZP THEN
      ZT
:=ZI*XP/ZPZZ:=ZI;
      
XL:=IP(.5+SQRT(XP*XP-ZT*ZT));
      FOR 
XI:=-XL TO XL DO
         
XT:=SQRT(XI*XI+ZT*ZT)*XFXX:=XI;
         
YY:=(SIN(XT)+.4*SIN(3*XT))*YF;
         
X1:=XX+ZZ+P;
         
Y1:=YY-ZZ+Q;
         
PIXON_P(X1,239-Y1,#00FF00);
         
IF Y1 <> 0 THEN
            LINE_P
(X1,240-Y1,X1,239,0)
         
END;
      
END;
   
END;
END;
FREEZE;
END

The results (using TEVAL) were as follows:

Hardware C: 24.2 sec.
Hardware D: 7.2 sec.

As you can see, the HW D is over three times as fast as the HW C for THIS benchmark.

I make NO claims as to any other speed differences in any other programs. I just thought the results were interesting.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
10-04-2018, 10:28 AM
Post: #2
RE: Informal Benchmark HW C vs HW D
Perhaps see what you think of this one?

http://www.hpmuseum.org/forum/thread-11402.html
Find all posts by this user
Quote this message in a reply
10-05-2018, 05:21 AM
Post: #3
RE: Informal Benchmark HW C vs HW D
Hello,

go in CAS and create a 50*50 random, floating point matrix:
randmat(50,50)*0.1

Then try inverting it using
Ans^-1

you will get an even larger boost there.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
10-06-2018, 05:57 AM
Post: #4
RE: Informal Benchmark HW C vs HW D
(10-04-2018 10:28 AM)grsbanks Wrote:  Perhaps see what you think of this one?

http://www.hpmuseum.org/forum/thread-11402.html

That's a great way to compare routines! Thanks for the heads-up.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
10-06-2018, 06:02 AM (This post was last modified: 10-06-2018 06:03 AM by toml_12953.)
Post: #5
RE: Informal Benchmark HW C vs HW D
(10-05-2018 05:21 AM)cyrille de brébisson Wrote:  Hello,

go in CAS and create a 50*50 random, floating point matrix:
randmat(50,50)*0.1

Then try inverting it using
Ans^-1

you will get an even larger boost there.

Cyrille

I inverted a 100x100 matrix on the G2 in 3.645 seconds. A Philco 2000 ad from November 1961 shows that the Philco 2000 could invert a 100x100 matrix in 60 seconds and the computer was a room-sized machine. Whew!

Philco 2000 ad from Nov 1961

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
10-06-2018, 08:33 AM (This post was last modified: 10-06-2018 01:20 PM by sasa.)
Post: #6
RE: Informal Benchmark HW C vs HW D
(10-04-2018 10:21 AM)toml_12953 Wrote:  Hardware C: 24.2 sec.
Hardware D: 7.2 sec.

I have made little addition into your code in order to display time in ms on the graph using TICKS variable:

Code:

EXPORT HAT()
BEGIN 

  LOCAL T := TICKS;

  ...

  T := TICKS - T;
  TEXTOUT_P(T,0,0,0,#FF0000);

  FREEZE;
END;

Testing it with latest public beta, it returns around 350ms. Calling program with TIME(HAT) returns usually the same... And this is far better result, assuming latest beta is true emulator and TICKS is indeed precise under 1 ms. What exactly firmware revision is on your devices?

Still reading PPL manual (testing samples occasionally), much better results (in theory) may be accomplished if it is possible to draw in additional graphics variable (G1-G9) and then simply swap with G0. This way (in theory) is avoided slow display transfer during computation.

EDIT: I have manage to find reference regarding copying graph data and that is BLIT. If used graphic variable specified to G1, copying complete content to G0 is simply BLIT(G1). What results are now on actual devices?
Find all posts by this user
Quote this message in a reply
10-07-2018, 07:16 AM
Post: #7
RE: Informal Benchmark HW C vs HW D
(10-06-2018 08:33 AM)sasa Wrote:  Testing it with latest public beta, it returns around 350ms. Calling program with TIME(HAT) returns usually the same... And this is far better result, assuming latest beta is true emulator and TICKS is indeed precise under 1 ms. What exactly firmware revision is on your devices?

As I said, I'm using the latest public beta software:

2.1.14091 (2018 09 17)

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
10-07-2018, 07:37 AM
Post: #8
RE: Informal Benchmark HW C vs HW D
(10-07-2018 07:16 AM)toml_12953 Wrote:  As I said, I'm using the latest public beta software:

2.1.14091 (2018 09 17)

Sorry, I have overlook this info...

In this case, true software emulation missing for Virtual Calculator. It would be interesting then, if you can test this variation with drawing content to G1 and copying to G0.

Thanks.
Find all posts by this user
Quote this message in a reply
10-07-2018, 11:56 AM
Post: #9
RE: Informal Benchmark HW C vs HW D
(10-06-2018 06:02 AM)toml_12953 Wrote:  
(10-05-2018 05:21 AM)cyrille de brébisson Wrote:  Hello,

go in CAS and create a 50*50 random, floating point matrix:
randmat(50,50)*0.1

Then try inverting it using
Ans^-1

you will get an even larger boost there.

Cyrille

I inverted a 100x100 matrix on the G2 in 3.645 seconds. A Philco 2000 ad from November 1961 shows that the Philco 2000 could invert a 100x100 matrix in 60 seconds and the computer was a room-sized machine. Whew!

Philco 2000 ad from Nov 1961

100x100 matrix inverted in 21s on G1 Rev C!

Guy R. KOMAN, hp 50G, hp Prime Rev. C
Find all posts by this user
Quote this message in a reply
10-07-2018, 03:45 PM
Post: #10
RE: Informal Benchmark HW C vs HW D
The calculation time for matrix inversion is very different in my tests...

on my desk I have both models rev. C and D calculators both equipped with firmware 2018-09-17 beta.

With that code

Code:

EXPORT ESSAI()
BEGIN
LOCAL m;
m:=RANDMAT(100,100)*0.1;
m:=m^(-1);
RETURN m;
END;

TEVAL(ESSAI) give me 6,8s on the C and 3,7s on the D.

BUT...
If you take your chronograph and just execute the program ESSAI from the command line you will have to wait about 27s on the rev.C and 21s on the rev.D before the results appear on the screen... computation time is one thing the time of the display is another.

I notice a difference in behavior also between the two versions. When the matrix is there on the screen if I click "shift+ Program" on the rev.C the list of user programs appears immediately on the other hand on the rev.D it takes several seconds to see appear the same list.

When the user program list is there if I press the "home" key I have to wait several seconds before seeing the stack (approx 15-16s on rev.D and 18-19s on rev.C).

Is it the same for you ?
Find all posts by this user
Quote this message in a reply
10-07-2018, 04:01 PM
Post: #11
RE: Informal Benchmark HW C vs HW D
On CAS side on the command line I make a:
Code:

RANDMAT(100,100)*0.1

then press shift + "x^-1"...

17s on rev.D (estimated time roughly) and 21s on the rev.C.

And the same difference in behavior:

1) I first clear the screen on both model (Shift+Clear);
2) Press the home key.

On rev.C the home stack is there immediately but on rev.D I have to wait for several seconds...
Find all posts by this user
Quote this message in a reply
10-13-2018, 08:50 AM
Post: #12
RE: Informal Benchmark HW C vs HW D
(10-07-2018 03:45 PM)dg1969 Wrote:  The calculation time for matrix inversion is very different in my tests...

on my desk I have both models rev. C and D calculators both equipped with firmware 2018-09-17 beta.

With that code

Code:

EXPORT ESSAI()
BEGIN
LOCAL m;
m:=RANDMAT(100,100)*0.1;
m:=m^(-1);
RETURN m;
END;

TEVAL(ESSAI) give me 6,8s on the C and 3,7s on the D.

BUT...
If you take your chronograph and just execute the program ESSAI from the command line you will have to wait about 27s on the rev.C and 21s on the rev.D before the results appear on the screen... computation time is one thing the time of the display is another.

I notice a difference in behavior also between the two versions. When the matrix is there on the screen if I click "shift+ Program" on the rev.C the list of user programs appears immediately on the other hand on the rev.D it takes several seconds to see appear the same list.

When the user program list is there if I press the "home" key I have to wait several seconds before seeing the stack (approx 15-16s on rev.D and 18-19s on rev.C).

Is it the same for you ?

Time the Inversion ONLY (leave the display out):
Code:

#cas
InvMat1(n):=
BEGIN
LOCAL t,Mat1;
  Mat1:=randMat(n,n)*0.1;
  MSGBOX(Mat1); // debugging
  t:=TICKS; Mat1:=Mat1^-1;
RETURN (TICKS-t)/1000.+"_s";
END;
#end
Usage: InvMat1(50) [ Enter ]
see the random matrix, for the inverse timing press again [ Enter ]
or tap | OK |
Press directly again [ Enter ] tap | OK |
and one more time and the fourth time to get the average

Now increase to 100 and do it 4 times, too by pressing the [ Enter ]

Try four times 200
Does anyone have also the G2?
Find all posts by this user
Quote this message in a reply
10-14-2018, 12:20 PM (This post was last modified: 10-14-2018 12:21 PM by dg1969.)
Post: #13
RE: Informal Benchmark HW C vs HW D
(10-13-2018 08:50 AM)CyberAngel Wrote:  Time the Inversion ONLY (leave the display out):
.....
Does anyone have also the G2?
Thank you for your answer but my purpose was precisely to highlight a potential problem related to the management of the display. Akmon asks the same question more clearly here on post #26 http://www.hpmuseum.org/forum/thread-11412-page-2.html.
Find all posts by this user
Quote this message in a reply
10-14-2018, 03:31 PM
Post: #14
RE: Informal Benchmark HW C vs HW D
Please, perform a comparative test on the graphic performance.





Source> https://tiplanet.org/forum/viewtopic.php...63#p224863
Find all posts by this user
Quote this message in a reply
10-14-2018, 06:19 PM
Post: #15
RE: Informal Benchmark HW C vs HW D
If my recollection is correct, the Mandelbrot takes about 16s on the G2.
Find all posts by this user
Quote this message in a reply
10-14-2018, 09:00 PM
Post: #16
RE: Informal Benchmark HW C vs HW D
I´ve just executed the python mendelbrot program, in G2 version, chronograph on hand.
So taking the time in the video, these are the results:

Prime G1: 140 seconds
Numworks: 85 seconds
Prime G2: 57 seconds
Find all posts by this user
Quote this message in a reply
10-14-2018, 09:16 PM
Post: #17
RE: Informal Benchmark HW C vs HW D
(10-04-2018 10:21 AM)toml_12953 Wrote:  I finally got my Prime G2. Thanks, De Rekenwinkel!

Of course, I had to benchmark the new hardware. I installed the proper beta firmware on both calculators and ran the following program:

PHP Code:
EXPORT HAT()
BEGIN 
LOCAL XP
,XR,YP,YR,ZP,XF,YF,ZF;
LOCAL ZI,ZT,XL,XI,XT,YY,X1,Y1;
LOCAL ZZ,XX;
RECT_P(0);
P:=160Q:=120;
XP:=144XR:=1.5*PI;
YP:=56YR:=1ZP:=64;
XF:=XR/XPYF:=YP/YRZF:=XR/ZP;
FOR 
ZI:=-Q TO Q-DO
   IF 
ZI >= -ZP AND ZI <= ZP THEN
      ZT
:=ZI*XP/ZPZZ:=ZI;
      
XL:=IP(.5+SQRT(XP*XP-ZT*ZT));
      FOR 
XI:=-XL TO XL DO
         
XT:=SQRT(XI*XI+ZT*ZT)*XFXX:=XI;
         
YY:=(SIN(XT)+.4*SIN(3*XT))*YF;
         
X1:=XX+ZZ+P;
         
Y1:=YY-ZZ+Q;
         
PIXON_P(X1,239-Y1,#00FF00);
         
IF Y1 <> 0 THEN
            LINE_P
(X1,240-Y1,X1,239,0)
         
END;
      
END;
   
END;
END;
FREEZE;
END

The results (using TEVAL) were as follows:

Hardware C: 24.2 sec.
Hardware D: 7.2 sec.

As you can see, the HW D is over three times as fast as the HW C for THIS benchmark.

I make NO claims as to any other speed differences in any other programs. I just thought the results were interesting.

Confirmed the results with my 2 Primes
Find all posts by this user
Quote this message in a reply
10-14-2018, 09:27 PM
Post: #18
RE: Informal Benchmark HW C vs HW D
(10-07-2018 03:45 PM)dg1969 Wrote:  The calculation time for matrix inversion is very different in my tests...

on my desk I have both models rev. C and D calculators both equipped with firmware 2018-09-17 beta.

With that code

Code:

EXPORT ESSAI()
BEGIN
LOCAL m;
m:=RANDMAT(100,100)*0.1;
m:=m^(-1);
RETURN m;
END;

TEVAL(ESSAI) give me 6,8s on the C and 3,7s on the D.

BUT...
If you take your chronograph and just execute the program ESSAI from the command line you will have to wait about 27s on the rev.C and 21s on the rev.D before the results appear on the screen... computation time is one thing the time of the display is another.

I notice a difference in behavior also between the two versions. When the matrix is there on the screen if I click "shift+ Program" on the rev.C the list of user programs appears immediately on the other hand on the rev.D it takes several seconds (4,8 seconds) to see appear the same list.

When the user program list is there if I press the "home" key I have to wait several seconds before seeing the stack (approx 15-16s on rev.D and 18-19s on rev.C) (18s on rev D and 21 seconds on rev C).

Is it the same for you ?

I confirm every result, read my red letters
Find all posts by this user
Quote this message in a reply
10-14-2018, 09:44 PM
Post: #19
RE: Informal Benchmark HW C vs HW D
(10-13-2018 08:50 AM)CyberAngel Wrote:  
(10-07-2018 03:45 PM)dg1969 Wrote:  The calculation time for matrix inversion is very different in my tests...

on my desk I have both models rev. C and D calculators both equipped with firmware 2018-09-17 beta.

With that code

Code:

EXPORT ESSAI()
BEGIN
LOCAL m;
m:=RANDMAT(100,100)*0.1;
m:=m^(-1);
RETURN m;
END;

TEVAL(ESSAI) give me 6,8s on the C and 3,7s on the D.

BUT...
If you take your chronograph and just execute the program ESSAI from the command line you will have to wait about 27s on the rev.C and 21s on the rev.D before the results appear on the screen... computation time is one thing the time of the display is another.

I notice a difference in behavior also between the two versions. When the matrix is there on the screen if I click "shift+ Program" on the rev.C the list of user programs appears immediately on the other hand on the rev.D it takes several seconds to see appear the same list.

When the user program list is there if I press the "home" key I have to wait several seconds before seeing the stack (approx 15-16s on rev.D and 18-19s on rev.C).

Is it the same for you ?

Time the Inversion ONLY (leave the display out):
Code:

#cas
InvMat1(n):=
BEGIN
LOCAL t,Mat1;
  Mat1:=randMat(n,n)*0.1;
  MSGBOX(Mat1); // debugging
  t:=TICKS; Mat1:=Mat1^-1;
RETURN (TICKS-t)/1000.+"_s";
END;
#end
Usage: InvMat1(50) [ Enter ]
see the random matrix, for the inverse timing press again [ Enter ]
or tap | OK |
Press directly again [ Enter ] tap | OK |
and one more time and the fourth time to get the average

Now increase to 100 and do it 4 times, too by pressing the [ Enter ]

Try four times 200
Does anyone have also the G2?

These are my results:

G2:

Invmat1(50) average: 0,0135s
Invmat1(100) average: 0,0795s
Invmat1(200) average: impossible to test. Calculator crashed, only restart with a clip. reported to calcbeta

G1:

Invmat1(50) average: 0,1665s
Invmat1(100) average: 1,113s
Invmat1(200) average: it shows a strange error message but it can continue doing the calculus: 8,472s.
Find all posts by this user
Quote this message in a reply
10-15-2018, 05:52 AM
Post: #20
RE: Informal Benchmark HW C vs HW D
(10-14-2018 09:00 PM)akmon Wrote:  I´ve just executed the python mendelbrot program, in G2 version, chronograph on hand.
So taking the time in the video, these are the results:

Prime G1: 140 seconds
Numworks: 85 seconds
Prime G2: 57 seconds

Try this one:
Code:

#cas
def fra1(X,Y,Nmax):
  w=2.7/X
  h=-1.87/Y
  Y=Y-1
  for y in range(ceiling(Y/2)+1):
    c = -2.1+i*(h*y+0.935)
    for x in range(X):
      z = 0
      for j in range(Nmax):
        if abs(z=z**2+c)>2:
          break
      PIXON_P(x,y,5100*j+512)
      PIXON_P(x,Y-y,5100*j+512)
      c = c+w;
  FREEZE
#end
fra1(320,220,10)[/code]
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)