Speed of HP-15C LE - and it's capabilities
05-25-2014, 08:36 AM (This post was last modified: 05-25-2014 08:39 AM by Tugdual.)
Post: #16
 Tugdual Senior Member Posts: 744 Joined: Dec 2013
RE: Speed of HP-15C LE - and it's capabilities
Tested the same problem with the Hp Prime.
Ease of development: much much easier than 34s or 15C, no question about that. Using lists and a few other convenient functions took me less than 1h while on the 34s it took me days of painful debugging. Also when you read the source code, there is a chance that you understand something while the 34s and 15c are quite challenging.

Speed: Prime is the big big winner. 1'51s to find the result! Amazing. You cannot even compare with old gen calculators.

Comments: here again the Prime demonstrates how powerful it is. Still I would use a 34s or 15c on a daily base. Definitely a matter of concept. The Prime seems to be lost somewhere in between a small computer and a calculator, demonstrating a lot of power and programming ease but not convenient for daily calculations.

Code:
next_permutation(); EXPORT permutations() begin    local t,v;    // Initializes the list of digits    makelist(A,A,1,9,1)▶L1;    print;    ticks()▶t;    repeat       // Evaluates one combination       L1(1)/(10*L1(2)+L1(3))+L1(4)/(10*L1(5)+L1(6))+L1(7)/(10*L1(8)+L1(9))▶v;       if 1-v==0 then           print(concat((ticks()-t)/1000,L1));       end;    until next_permutation()==0; END; // gets next permutation next_permutation() begin LOCAL i,j,k,v; 9▶i; while(1) do    i▶j;    i-1▶i;    if L1(i)<L1(j) then       9▶k;       while(L1(i) >= L1(k)) do k-1▶k; end;       // swaps item i & k       L1(k)▶v;         L1(i)▶L1(k);       v▶L1(i);       // reverse from j to end       concat(sub(L1,1,j-1), reverse(sub(L1,j,9)))▶L1;       return 1;    end;    if i==1 then       reverse(L1)▶L1;       return 0;    end; end; // while end;
 « Next Oldest | Next Newest »

 Messages In This Thread Speed of HP-15C LE - and it's capabilities - Jeff_Kearns - 05-13-2014, 08:20 PM RE: Speed of HP-15C LE - and it's capabilities - Tugdual - 05-13-2014, 08:41 PM RE: Speed of HP-15C LE - and it's capabilities - Jeff_Kearns - 05-13-2014, 08:47 PM RE: Speed of HP-15C LE - and it's capabilities - Katie Wasserman - 05-14-2014, 04:58 AM RE: Speed of HP-15C LE - and it's capabilities - Paul Dale - 05-14-2014, 01:37 AM RE: Speed of HP-15C LE - and it's capabilities - Thomas Klemm - 05-14-2014, 02:41 AM RE: Speed of HP-15C LE - and it's capabilities - Gerson W. Barbosa - 05-14-2014, 01:16 AM RE: Speed of HP-15C LE - and it's capabilities - Dave Britten - 05-14-2014, 02:12 AM RE: Speed of HP-15C LE - and it's capabilities - Thomas Klemm - 05-14-2014, 03:25 AM RE: Speed of HP-15C LE - and it's capabilities - Namir - 05-14-2014, 04:11 PM RE: Speed of HP-15C LE - and it's capabilities - Gerson W. Barbosa - 05-14-2014, 07:27 PM RE: Speed of HP-15C LE - and it's capabilities - Tugdual - 05-18-2014, 08:49 AM RE: Speed of HP-15C LE - and it's capabilities - Thomas Klemm - 05-18-2014, 09:25 AM RE: Speed of HP-15C LE - and it's capabilities - Tugdual - 05-18-2014, 09:53 AM RE: Speed of HP-15C LE - and it's capabilities - Tugdual - 05-23-2014, 12:37 PM RE: Speed of HP-15C LE - and it's capabilities - Tugdual - 05-25-2014 08:36 AM RE: Speed of HP-15C LE - and it's capabilities - Jeff_Kearns - 05-25-2014, 01:37 PM RE: Speed of HP-15C LE - and it's capabilities - Tugdual - 05-25-2014, 04:54 PM

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