Some benchmarks

Post Reply
Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Some benchmarks

Post by Henko »

' i used the following benchmark program to check the calculation speed of Smart Basic on some hardware here, including
' the new iPhone 5S. The program inverts a 20x20 matrix with random elements.
'
' The results are:
' iPhone 3GS : 630 msec. (milliseconds)
' iPad 1 : 515 msec.
' iPad 3 : 235 msec.
' iPhone 5S. : 60 msec.
'
' using a pure graphics program (automaton) the 5S is also about 10 times faster than the 3GS.
'
option base 1 ! sz=20
dim ma(sz,sz),mi(sz,sz)
mat_rnd (sz,sz,ma,-10,10)
timer reset
mat_inv (sz,ma,mi)
print timer()
end

' produce a matrix with random elements between mini and maxi
'
def mat_rnd (n,m,mat(,),mini,maxi)
for i=1 to n
for j=1 to m ! mat(i,j)=mini+(maxi-mini)*rnd(1) ! next j
next i
end def

' produce the inverse of square matrix a() giving matrix ainv()
'
def mat_inv (nvar,a(,),ainv(,))
dim w(nvar,2*nvar)
for i=1 to nvar
for j=1 to nvar ! w(i,j)=a(i,j) ! w(i,j+nvar)=0 ! next j
w(i,i+nvar)=1
next i
for piv=1 to nvar
fac=w(piv,piv)
for j=piv to piv+nvar ! w(piv,j)=w(piv,j)/fac ! next j
for i=1 to nvar
if i<>piv then
fac=w(i,piv)
for j=piv to piv+nvar ! w(i,j)=w(i,j)-fac*w(piv,j) ! next j
endif
next i
next piv
for i=1 to nvar
for j=1 to nvar ! ainv(i,j)=w(i,j+nvar) ! next j
next i
end def

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Some benchmarks

Post by Mr. Kibernetik »

So interesting!
iPhone 5S is so fast, incredible...

iOS 6 Simulator on my MacBook gives 74 ms.
iOS 7 Simulator gives 97 ms.

I have updated the test to perform multiple tests and returning average time.
Attachments
benchmark.txt
(1.01 KiB) Downloaded 294 times

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Some benchmarks

Post by rbytes »

There are some gems to discover if you search back through previous pages of the Forum. This benchmark calculator, created by Henko and expanded by Mr. Kibernetik is just as useful today as when it was created over 2 years ago. At that time Henko posted these results:
' iPhone 3GS : 630 msec. (milliseconds)
' iPad 1 : 515 msec.
' iPad 3 : 235 msec.
' iPhone 5S. : 60 msec.
'
To those, I can now add:

iPad Air 1 : 28.8 msec.
iPhone 6 : 25.2 msec.
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Some benchmarks

Post by Mr. Kibernetik »

iPad Air 2: 23.09 ms

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Some benchmarks

Post by rbytes »

Nice!
The only thing that gets me down is gravity...

User avatar
Dav
Posts: 279
Joined: Tue Dec 30, 2014 5:12 pm
My devices: iPad Mini, iPod Touch.
Location: North Carolina, USA
Contact:

Re: Some benchmarks

Post by Dav »

The lowest I get is 195 on iPad mini

- Dav

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Some benchmarks

Post by rbytes »

It might be a good idea to close all other apps before running this test.
The only thing that gets me down is gravity...

User avatar
Dav
Posts: 279
Joined: Tue Dec 30, 2014 5:12 pm
My devices: iPad Mini, iPod Touch.
Location: North Carolina, USA
Contact:

Re: Some benchmarks

Post by Dav »

After closing apps I get

iPad mini : 191

iPod touch 5th gen: 243

- Dav

Operator
Posts: 138
Joined: Mon May 06, 2013 5:52 am

Re: Some benchmarks

Post by Operator »

I get ~530ms on my iPhone 4 :shock:
Guess its time for a 5s... :)

But the "bottleneck" are the graphics...
So a combined bench-test would be better...

Post Reply