Post Reply 
Summation based benchmark for calculators
08-24-2019, 08:07 PM (This post was last modified: 08-25-2019 03:02 PM by toml_12953.)
Post: #184
RE: Summation based benchmark for calculators
(08-20-2019 06:14 PM)pier4r Wrote:  Does someone have the nspire II? If yes, can the person do the test?

There were several benchmarks mentioned. I ran the nqueens program below on an Nspire CX II CAS in about 2.9 seconds. I really wish the Nspire had an RTC for more accurate measurements.
BTW, I'm using OS 5.1 which was released recently.

Code:
Define nqueens()=
Prgm
  Local a,r,s,t,x,y
  8->r
  newList(r)->a
  0->s
  0->x
  Loop
    x+1->x
    r->a[x]
    Loop
      s+1->s
      x->y
      While y>1
        y-1->y
        a[x]-a[y]->t
        If t=0 or x-y=abs(t) Then
          0->y
          a[x]-1->a[x]
          While a[x]=0
            x-1->x
            a[x]-1->a[x]
          EndWhile
        EndIf
      EndWhile
      If y=1
        Exit
    EndLoop
    If x=r
      Exit
  EndLoop
  Disp s
EndPrgm

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Summation based benchmark for calculators - toml_12953 - 08-24-2019 08:07 PM



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