dhrystone and whetstone benchmarks

Post here first, or if you can't find a relevant section!
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: dhrystone and whetstone benchmarks

Post by ag123 »

tried with libmaple core, apparently need some fixes on the printf, using Serial.println instead

here is what it looks like for -Os 84 Mhz

Code: Select all

##########################################
Single Precision C Whetstone Benchmark
Calibrate
0.19 Seconds1.00 Passes (x 100)
0.96 Seconds5.00 Passes (x 100)
4.78 Seconds25.00 Passes (x 100)
Use52 passes (x 100)
Single Precision C/C++ Whetstone Benchmark
Loop content                  Result              MFLOPS      MOPS   Seconds

N1 floating point -1.12
39.31 0.03
N2 floating point -1.12
29.00 0.24
N3 if then else   1.00
42.05 0.13
N4 fixed point    12.00
89.51 0.18
N5 sin,cos etc.   0.50
1.84 2.35
N6 floating point 1.00
8.52 3.29
N7 assignments    3.00
7.18 1.34
N8 exp,sqrt etc.  0.75
0.81 2.39
MWIPS
52.30 9.94
here is what it looks like for -O3 84 Mhz

Code: Select all

##########################################
Single Precision C Whetstone Benchmark
Calibrate
0.12 Seconds1.00 Passes (x 100)
0.61 Seconds5.00 Passes (x 100)
3.07 Seconds25.00 Passes (x 100)
Use81 passes (x 100)
Single Precision C/C++ Whetstone Benchmark
Loop content                  Result              MFLOPS      MOPS   Seconds

N1 floating point -1.12
41.92 0.04
N2 floating point -1.12
31.74 0.34
N3 if then else   1.00
0.00 0.00
N4 fixed point    12.00
96.65 0.26
N5 sin,cos etc.   0.50
1.87 3.60
N6 floating point 1.00
26.46 1.65
N7 assignments    3.00
41.81 0.36
N8 exp,sqrt etc.  0.75
0.81 3.71
MWIPS
81.33 9.96
Attachments
Whetstone_SP_STM32_Serial.print.zip
(4.7 KiB) Downloaded 294 times
Last edited by ag123 on Sat Jan 25, 2020 4:12 pm, edited 1 time in total.
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: dhrystone and whetstone benchmarks

Post by Pito »

So the MFLOPS are (single precision, 84MHz, FPU on, F401)

-Os 40, 30 and 8.5
-O3 42, 32 and 26

Pretty consistent with my estimation in the 401 thread (around 30).

Would be great to fix the printf in the libmaple.
It compiles with STM32 core with printf setting.
Last edited by Pito on Sat Jan 25, 2020 4:30 pm, edited 1 time in total.
Pukao Hats Cleaning Services Ltd.
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: dhrystone and whetstone benchmarks

Post by ag123 »

sounds sensible for an 'achievable' mflops :lol:
i've been thinking if after all it is feasible to do
- fir filters on stm32f4, this seemed possible
- small neural nets (may need extra dram such as a spi dram), this may be quite stretch due to the combo of limited memory and processor speeds
if small neural nets is possible it may be possible to use stm32 to detect transient analog signals patterns that are common in 'nature'
e.g. a coil pickup for a swinging magnet e.g. a seismometer
or perhaps proximity signals from a tcrt5000 led, ir diode combo
https://www.vishay.com/docs/83760/tcrt5000.pdf
the 'china' ones are quite cheap, but specs may not be exactly be what the vishay datasheets specified
https://www.aliexpress.com/wholesale?ca ... t=tcrt5000
i find one of the tough parts for proximity detection being a background signal (noise) level such as ambient radiation
i'd guess those micromouse etc use some pretty high thresholds to tell that a wall is just in front
Last edited by ag123 on Sat Jan 25, 2020 4:40 pm, edited 4 times in total.
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: dhrystone and whetstone benchmarks

Post by Pito »

Have a look at the results table in the 401 thread - the results are almost identical to a Pentium at 120-133MHz clock, or Cyrix at 166MHz clock.
That is something I would buy.. conniving.. :)
Pukao Hats Cleaning Services Ltd.
Bingo600
Posts: 86
Joined: Sat Dec 21, 2019 3:56 pm

Re: dhrystone and whetstone benchmarks

Post by Bingo600 »

I just did it for the F411@96MHz -O3 - Steve Core

Code: Select all

##########################################
Single Precision C Whetstone Benchmark
Calibrate
0.10 Seconds1.00 Passes (x 100)
0.50 Seconds5.00 Passes (x 100)
2.48 Seconds25.00 Passes (x 100)
Use100 passes (x 100)
Single Precision C/C++ Whetstone Benchmark
Loop content                  Result              MFLOPS      MOPS   Seconds

N1 floating point -1.12
47.88 0.04
N2 floating point -1.12
35.94 0.37
N3 if then else   1.00
0.00 0.00
N4 fixed point    12.00
205.88 0.15
N5 sin,cos etc.   0.50
2.17 3.83
N6 floating point 1.00
35.91 1.50
N7 assignments    3.00
47.88 0.39
N8 exp,sqrt etc.  0.75
1.02 3.63
MWIPS
100.81 9.92




Why doesn't it print Time used at last ?

/Bingo
Last edited by Bingo600 on Sun Jan 26, 2020 6:36 am, edited 1 time in total.
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: dhrystone and whetstone benchmarks

Post by Pito »

F411@96MHz -O3
MFLOPS 48 36 36

http://www.roylongbottom.org.uk/whetstone%20results.htm

Looks like Pentium Pro @200MHz.
:?
Pukao Hats Cleaning Services Ltd.
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: dhrystone and whetstone benchmarks

Post by Pito »

BlackF407 @168MHz, via SerialUSB with original printf(), STM core,

-Os

Code: Select all

##########################################
Single Precision C Whetstone Benchmark
Calibrate
       0.14 Seconds          1   Passes (x 100)
       0.71 Seconds          5   Passes (x 100)
       3.53 Seconds         25   Passes (x 100)

Use 70  passes (x 100)

          Single Precision C/C++ Whetstone Benchmark
Loop content                  Result              MFLOPS      MOPS   Seconds

N1 floating point     -1.12475013732910156        79.059              0.017
N2 floating point     -1.12274742126464844        57.366              0.164
N3 if then else        1.00000000000000000                  84.244    0.086
N4 fixed point        12.00000000000000000                 250.569    0.088
N5 sin,cos etc.        0.49909299612045288                   1.318    4.420
N6 floating point      0.99999982118606567        15.746              2.398
N7 assignments         3.00000000000000000                  13.617    0.950
N8 exp,sqrt etc.       0.75110614299774170                   1.489    1.749

MWIPS                                             70.908              9.872
-O2

Code: Select all

##########################################
Single Precision C Whetstone Benchmark
Calibrate
       0.10 Seconds          1   Passes (x 100)
       0.51 Seconds          5   Passes (x 100)
       2.53 Seconds         25   Passes (x 100)

Use 98  passes (x 100)

          Single Precision C/C++ Whetstone Benchmark
Loop content                  Result              MFLOPS      MOPS   Seconds

N1 floating point     -1.12475013732910156        86.662              0.022
N2 floating point     -1.12274742126464844        57.575              0.229
N3 if then else        1.00000000000000000                 167.850    0.060
N4 fixed point        12.00000000000000000                 314.827    0.098
N5 sin,cos etc.        0.49909299612045288                   1.325    6.156
N6 floating point      0.99999982118606567        59.270              0.892
N7 assignments         3.00000000000000000                  71.967    0.252
N8 exp,sqrt etc.       0.75110614299774170                   1.654    2.204

MWIPS                                             98.872              9.912
-O3

Code: Select all

##########################################
Single Precision C Whetstone Benchmark
Calibrate
       0.10 Seconds          1   Passes (x 100)
       0.51 Seconds          5   Passes (x 100)
       2.53 Seconds         25   Passes (x 100)

Use 98  passes (x 100)

          Single Precision C/C++ Whetstone Benchmark
Loop content                  Result              MFLOPS      MOPS   Seconds

N1 floating point     -1.12475013732910156        84.000              0.022
N2 floating point     -1.12274742126464844        64.250              0.205
N3 if then else        1.00000000000000000               10138.900    0.001
N4 fixed point        12.00000000000000000                 363.178    0.085
N5 sin,cos etc.        0.49909299612045288                   1.295    6.294
N6 floating point      0.99999982118606567        59.261              0.892
N7 assignments         3.00000000000000000                  84.234    0.215
N8 exp,sqrt etc.       0.75110614299774170                   1.663    2.192

MWIPS                                             98.926              9.906
And the working ino:
Attachments
Whetstone_sp_stm32_usb.zip
(4.53 KiB) Downloaded 282 times
Last edited by Pito on Sat Jan 25, 2020 9:37 pm, edited 2 times in total.
Pukao Hats Cleaning Services Ltd.
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: dhrystone and whetstone benchmarks

Post by Pito »

While looking at the above results - the MFLOPS somehow copies the clock, but MWIPS does not..

Code: Select all

F401 @84MHz    MWIPS 81      MFLOPS 42 32 26    
F411 @96MHz    MWIPS 100     MFLOPS 48 36 36
F407 @168MHz   MWIPS 99      MFLOPS 84 64 59
PS: looks like the N3 test has got a problem with -O3..
Pukao Hats Cleaning Services Ltd.
Bingo600
Posts: 86
Joined: Sat Dec 21, 2019 3:56 pm

Re: dhrystone and whetstone benchmarks

Post by Bingo600 »

Well i bit the bullet , and installed the Official STM core via the json url.

Used pito's latest source (stm32...._usb)
viewtopic.php?p=891#p891

I had to set my putty (linux) to LF = CR/LF , or the output would be FSCK'ed up.

These are my settings in the IDE (-O3)
STM-Menu.png
STM-Menu.png (34.9 KiB) Viewed 6032 times
-Os

Code: Select all

##########################################
Single Precision C Whetstone Benchmark
Calibrate
       0.25 Seconds          1   Passes (x 100)
       1.24 Seconds          5   Passes (x 100)
       6.19 Seconds         25   Passes (x 100)

Use 40  passes (x 100)

          Single Precision C/C++ Whetstone Benchmark
Loop content                  Result              MFLOPS      MOPS   Seconds

N1 floating point     -1.12475013732910156        39.588              0.019
N2 floating point     -1.12274742126464844        29.217              0.184
N3 if then else        1.00000000000000000                  42.245    0.098
N4 fixed point        12.00000000000000000                 126.000    0.100
N5 sin,cos etc.        0.49909299612045288                   0.800    4.161
N6 floating point      0.99999982118606567         8.395              2.570
N7 assignments         3.00000000000000000                   7.407    0.998
N8 exp,sqrt etc.       0.75110614299774170                   0.841    1.769

MWIPS                                             40.406              9.899

-O2

Code: Select all

##########################################
Single Precision C Whetstone Benchmark
Calibrate
       0.18 Seconds          1   Passes (x 100)
       0.87 Seconds          5   Passes (x 100)
       4.36 Seconds         25   Passes (x 100)

Use 57  passes (x 100)

          Single Precision C/C++ Whetstone Benchmark
Loop content                  Result              MFLOPS      MOPS   Seconds

N1 floating point     -1.12475013732910156        40.684              0.027
N2 floating point     -1.12274742126464844        29.240              0.262
N3 if then else        1.00000000000000000                  84.279    0.070
N4 fixed point        12.00000000000000000                 157.500    0.114
N5 sin,cos etc.        0.49909299612045288                   0.809    5.865
N6 floating point      0.99999982118606567        29.620              1.038
N7 assignments         3.00000000000000000                  35.951    0.293
N8 exp,sqrt etc.       0.75110614299774170                   0.930    2.281

MWIPS                                             57.287              9.950


-O3

Code: Select all


##########################################
Single Precision C Whetstone Benchmark
Calibrate
       0.17 Seconds          1   Passes (x 100)
       0.86 Seconds          5   Passes (x 100)
       4.29 Seconds         25   Passes (x 100)

Use 58  passes (x 100)

          Single Precision C/C++ Whetstone Benchmark
Loop content                  Result              MFLOPS      MOPS   Seconds

N1 floating point     -1.12475013732910156        42.023              0.026
N2 floating point     -1.12274742126464844        32.079              0.243
N3 if then else        1.00000000000000000                   0.000    0.000
N4 fixed point        12.00000000000000000                 180.891    0.101
N5 sin,cos etc.        0.49909299612045288                   0.808    5.971
N6 floating point      0.99999982118606567        29.626              1.056
N7 assignments         3.00000000000000000                  42.033    0.255
N8 exp,sqrt etc.       0.75110614299774170                   0.933    2.313

MWIPS                                             58.201              9.965


I have no idea what speed i'm running (yet) , but it's not impressive results. Compared to the previous build.

Is ART enabled by default ??
Where can i set the (PLL) speed in the "Official Core)

I have attached the build-log for -03

/Bingo
Attachments
STM-Core-build.log.zip
(12.09 KiB) Downloaded 245 times
Last edited by Bingo600 on Sun Jan 26, 2020 8:05 am, edited 2 times in total.
Bingo600
Posts: 86
Joined: Sat Dec 21, 2019 3:56 pm

Re: dhrystone and whetstone benchmarks

Post by Bingo600 »

@Pito

I haven't touched a single bit in the Official Core setup , just install.
Did you add something to get those numbers ?

Ie. add -march=armv7e-m+fp , seemed like that made a difference in Steve's core (well arm-gcc)

Hmm ... Looks fishy to specify an armv7 , but it gave a huge performance increase .. (If it does execute correct)


/Bingo
Post Reply

Return to “General discussion”