Post Reply 
Brute simple speed check program
09-06-2022, 09:43 AM (This post was last modified: 09-06-2022 12:51 PM by Bill Triplett.)
Post: #1
Brute simple speed check program
At 3.2GHz the PC emulator needs one second to do 1000000 loops.
On an old Samsung Galaxy Note 4, the Android emulator is about 15 times slower than the PC version.
How do the actual physical calculators score? G1? G2?
Please try this program with a million loops, and share your test results:

Code:
// Input the number of loops.
// Output is the number of seconds.
EXPORT LOOP(N)
  BEGIN 
  LOCAL S := 0, T, K;
  T := TICKS();
  FOR K FROM 1 TO N DO 
    S := S+1;
  END;
  T := TICKS() - T;
  RETURN T/1000;
END;


Attached File(s)
.txt  LOOP.txt (Size: 326 bytes / Downloads: 13)
.hpprgm  LOOP.hpprgm (Size: 1.84 KB / Downloads: 7)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Brute simple speed check program - Bill Triplett - 09-06-2022 09:43 AM



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