08-29-2018, 06:56 AM
That does sound plausible. Maybe you'd want to re-use your G2 memory management code in the previous Prime hardware versions? That could be a cool boost for what is already a great machine.
(08-29-2018 06:53 AM)cyrille de brébisson Wrote: [ -> ]Hello,
I was very surprised to see the speed difference between the G1 and G2.
CPU frequency of G2 is faster (about 30% from memory). And it has more cache and a better micro architecture... But nothing that warant a *2 or more extra speed (no super scalar for example).
It's RAM is better, yes, but in a tight loop benchmark, only the cache is used, so it does not mater...
(08-29-2018 06:53 AM)cyrille de brébisson Wrote: [ -> ]My best guess is that the extra speed come from a better OS.
Cyrille
(08-29-2018 06:53 AM)cyrille de brébisson Wrote: [ -> ]Hello,
I was very surprised to see the speed difference between the G1 and G2.
CPU frequency of G2 is faster (about 30% from memory). And it has more cache and a better micro architecture... But nothing that warant a *2 or more extra speed (no super scalar for example).
It's RAM is better, yes, but in a tight loop benchmark, only the cache is used, so it does not mater...
Extra speed in the CAS, when it comes to floating points (invert a 100*100 floating matrix for example), or in the advanced grapher/3D grapher are easely explained by the presence of the FPU (which is used by these 3 items)...
But extra speed in Home is not as Home does not use floats.
My best guess is that the extra speed come from a better OS.
First G2 has way way less threads running around. Saving a lot of CPU time.
But more importantly, the OS did not come with malloc and I had to recreate the whole memory allocation system, and I think that my code is way better than the BestaOS one.
Since both PPL and CAS programs are HUGELY dependent on mallocs, this probably makes up for a lot of the speed up...
Cyrille
(08-18-2018 06:16 AM)mfleming Wrote: [ -> ]This may be the wrong thread or even the wrong venue, but is there a chance that HP might encourage third-party (likely, commercial) development on the Prime hardware platform? I'm thinking something along the lines of the old HP-41 "Blanknut" platform offering. The idea of a customizable handheld with such obvious capability aimed at niche markets would excite quite a crowd of developers.
(08-29-2018 06:53 AM)cyrille de brébisson Wrote: [ -> ]Hello,Oh, I wish we could have a REAL processor inside the Prime.
I was very surprised to see the speed difference between the G1 and G2.
CPU frequency of G2 is faster (about 30% from memory). And it has more cache and a better micro architecture... But nothing that warant a *2 or more extra speed (no super scalar for example).
It's RAM is better, yes, but in a tight loop benchmark, only the cache is used, so it does not mater...
<CLIP>
Cyrille
(08-30-2018 12:40 AM)CyberAngel Wrote: [ -> ](08-29-2018 06:53 AM)cyrille de brébisson Wrote: [ -> ]Hello,Oh, I wish we could have a REAL processor inside the Prime.
I was very surprised to see the speed difference between the G1 and G2.
CPU frequency of G2 is faster (about 30% from memory). And it has more cache and a better micro architecture... But nothing that warant a *2 or more extra speed (no super scalar for example).
It's RAM is better, yes, but in a tight loop benchmark, only the cache is used, so it does not mater...
<CLIP>
Cyrille
Maybe not quite SD 1000, but a ten times faster one with much better RAM
Some buy the more expensive iPhone
Why not a HP Prime FAST?!
twice the price - ten times the speed!!!
VPN
PS: I would love to have three index or 3D Matrices
Do you offer a C Development Framework & Toolset for developers?
(08-30-2018 02:08 AM)Anders Wrote: [ -> ]Yes, indeed!(08-30-2018 12:40 AM)CyberAngel Wrote: [ -> ]<CLIP>
PS: I would love to have three index or 3D Matrices
Or generally, a support for tensor calculus would be nice ... maybe even up to (2,3) type tensors.
(08-30-2018 12:40 AM)CyberAngel Wrote: [ -> ]Oh, I wish we could have a REAL processor inside the Prime.
Maybe not quite SD 1000, but a ten times faster one with much better RAM
Some buy the more expensive iPhone
Why not a HP Prime FAST?!
twice the price - ten times the speed!!!
VPN
PS: I would love to have three index or 3D Matrices
Do you offer a C Development Framework & Toolset for developers?
(08-30-2018 02:55 AM)CyberAngel Wrote: [ -> ](08-30-2018 02:08 AM)Anders Wrote: [ -> ]Or generally, a support for tensor calculus would be nice ... maybe even up to (2,3) type tensors.Yes, indeed!
I think that Bernard Parisse could possibly do it
along with the needed index manipulations commands (among others)
I could easily wait a year as long as I know it will be done,
VPN
PS: I still want a wide & fast ARM CPU with 10*speed potential
HP Prime Flash
(08-30-2018 01:48 PM)CyberAngel Wrote: [ -> ]To the Real People out there:
Do you want a slower or faster calculator?
(instead of a wisecrack answer)
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;
sol, nodes, rowChange;
nrow(board,sz,row);
EXPORT nqueen2(sz)
BEGIN
LOCAL startTime, duration, board, res;
sol := 0; nodes := 0; rowChange := 0;
// is sz a real or an integer?
IF TYPE(sz) = 1 THEN
sz := B→R(sz);
ELSE
IF TYPE(sz) <> 0 THEN
RETURN {};
END;
END;
// Make sure we're in range
sz := IP(ABS(sz));
IF sz=0 OR sz>15 THEN
RETURN {};
END;
// Off we go. Create the board and start working.
board := MAKELIST(0,X,1,sz);
startTime := TICKS();
nrow(board,sz,1);
duration := (TICKS() - startTime)/1000;
RETURN {duration,sol,nodes,rowChange};
END;
nrow(board,sz,row)
BEGIN
LOCAL c, r, safe;
FOR c FROM 1 TO sz DO
nodes := nodes + 1;
safe := 1;
FOR r FROM 1 TO row-1 DO
IF board(r)=c OR ABS(board(r)-c)=row-r THEN
safe := 0;
BREAK;
END;
END;
IF (safe=1) THEN
IF row=sz THEN
sol := sol + 1;
ELSE
rowChange := rowChange + 1;
board(row) := c;
nrow(board,sz,row+1);
END;
END;
END;
END;
(08-30-2018 02:48 PM)grsbanks Wrote: [ -> ]Would you not rather run a benchmark that finds ALL the solutions to the n-queens problem rather than stopping at the first one? My Rev. C Prime takes 10.3 seconds to run this:
Code:
sol, nodes, rowChange;
nrow(board,sz,row);
EXPORT nqueen2(sz)
BEGIN
LOCAL startTime, duration, board, res;
sol := 0; nodes := 0; rowChange := 0;
// is sz a real or an integer?
IF TYPE(sz) = 1 THEN
sz := B→R(sz);
ELSE
IF TYPE(sz) <> 0 THEN
RETURN {};
END;
END;
// Make sure we're in range
sz := IP(ABS(sz));
IF sz=0 OR sz>15 THEN
RETURN {};
END;
// Off we go. Create the board and start working.
board := MAKELIST(0,X,1,sz);
startTime := TICKS();
nrow(board,sz,1);
duration := (TICKS() - startTime)/1000;
RETURN {duration,sol,nodes,rowChange};
END;
nrow(board,sz,row)
BEGIN
LOCAL c, r, safe;
FOR c FROM 1 TO sz DO
nodes := nodes + 1;
safe := 1;
FOR r FROM 1 TO row-1 DO
IF board(r)=c OR ABS(board(r)-c)=row-r THEN
safe := 0;
BREAK;
END;
END;
IF (safe=1) THEN
IF row=sz THEN
sol := sol + 1;
ELSE
rowChange := rowChange + 1;
board(row) := c;
nrow(board,sz,row+1);
END;
END;
END;
END;
(08-30-2018 02:48 PM)grsbanks Wrote: [ -> ]Would you not rather run a benchmark that finds ALL the solutions to the n-queens problem rather than stopping at the first one?
(08-30-2018 02:43 PM)xerxes Wrote: [ -> ]Very impressive and unexpected speedup of the G2. It would be nice, if somebody can run the n-queens problem
on the G2 to see the speed factor for another type of benchmark:
Code:
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 speed on the G1 was tested with 0.346 seconds. Maybe the G2 can overtake newRPL on the 50G with 0.106 seconds.
I don't know, if there is any speed advantage declaring the variables as local.