dhrystone and whetstone benchmarks

Post here first, or if you can't find a relevant section!
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: dhrystone and whetstone benchmarks

Post by Pito »

Nope. No other special settings.
1. the MFLOPS numbers we get are still a bit high to my taste.. But it could be the gcc makes miracles.. I would expect MFLOPs at 1/3 or 1/4 of clock. I got 82MFlops at 168MHz, that is really unbelievable high..
2. the -O3 is not good as it optimizes off the N3 measurement (seee the result).
I would better stay with -O2
3, The FPU is on, it seems, based on the results.
4, there is a link with hundreds of results off this test, you may see F407/F411 outperforms Pentium/Cyrix/AMD chips from 90ties.. :shock:
Pukao Hats Cleaning Services Ltd.
Bingo600
Posts: 86
Joined: Sat Dec 21, 2019 3:56 pm

Re: dhrystone and whetstone benchmarks

Post by Bingo600 »

W. STM Core (untouched settings) and a F4011 i get -O2 : 40 30 30
I don't know the clock settings (yet)

Seems a bit more realistic , the FPU doc said all FLOPS (Except divide) was single cycle on a M4.
But as you mentioned .. We also have to load/save the results ... Takes cycles too.

How do you know your F407 runs 168MHz ??


/Bingo
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: dhrystone and whetstone benchmarks

Post by Pito »

F407 is usually set to 168MHz, so it is my assumption the STM core sets that.
You clock looks like 72MHz.

The FPU does in 1 or 3 or 14 cycles, 2+ cycles is load/store, I think it has got some combined/fused operations like MAC (3 cycles)..
Not sure such FPU optimised operations are available off gcc, there are special CMSIS libraries available for DSP and FPU advanced topics, see below.
DSP+FPU intro:
https://www.youtube.com/watch?v=tGMsLvz7bBY
Pukao Hats Cleaning Services Ltd.
Bingo600
Posts: 86
Joined: Sat Dec 21, 2019 3:56 pm

Re: dhrystone and whetstone benchmarks

Post by Bingo600 »

ST Core

Just dug out an original STM F407-Discovery (Old board)

-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.57 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                  83.276    0.087
N4 fixed point        12.00000000000000000                 253.449    0.087
N5 sin,cos etc.        0.49909299612045288                   1.284    4.537
N6 floating point      0.99999982118606567        15.739              2.399
N7 assignments         3.00000000000000000                  13.617    0.950
N8 exp,sqrt etc.       0.75110614299774170                   1.492    1.745

MWIPS                                             70.098              9.986

-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.57 Seconds         25   Passes (x 100)

Use 97  passes (x 100)

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

N1 floating point     -1.12475013732910156        81.684              0.023
N2 floating point     -1.12274742126464844        57.685              0.226
N3 if then else        1.00000000000000000                 167.325    0.060
N4 fixed point        12.00000000000000000                 315.000    0.097
N5 sin,cos etc.        0.49909299612045288                   1.292    6.247
N6 floating point      0.99999982118606567        59.255              0.883
N7 assignments         3.00000000000000000                  71.990    0.249
N8 exp,sqrt etc.       0.75110614299774170                   1.654    2.182

MWIPS                                             97.323              9.967


-O3

Code: Select all

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

Use 100  passes (x 100)

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

N1 floating point     -1.12475013732910156        83.843              0.023
N2 floating point     -1.12274742126464844        64.306              0.209
N3 if then else        1.00000000000000000                   0.000    0.000
N4 fixed point        12.00000000000000000                 362.069    0.087
N5 sin,cos etc.        0.49909299612045288                   1.330    6.255
N6 floating point      0.99999982118606567        59.275              0.910
N7 assignments         3.00000000000000000                  83.620    0.221
N8 exp,sqrt etc.       0.75110614299774170                   1.655    2.248

MWIPS                                            100.473              9.953

Had to put a delay(3000); , after the last SerialUSB.printf("%39.3f%19.3f\n\n", mwips, TimeUsed);
Else it didn't show ... It's prob bad karma to have an empty loop()

/Bingo
Bingo600
Posts: 86
Joined: Sat Dec 21, 2019 3:56 pm

Re: dhrystone and whetstone benchmarks

Post by Bingo600 »

@Pito

Your (-O2) N2 is quite different from mine
viewtopic.php?p=891#p891

You get 86 , i get 81 :o

/Bingo
User avatar
Pito
Posts: 94
Joined: Tue Dec 24, 2019 1:53 pm

Re: dhrystone and whetstone benchmarks

Post by Pito »

What device have you selected for the Discovery F407?
Try with BlackF407ZE

It could be the boards have different gcc setting..
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 selected Disco
Disco.png
Disco.png (49.61 KiB) Viewed 5360 times
Hmm the forum doesn't like Colons in the upload filename
Menu_2020012608:18:35.png is flagged as invalid :?

/Bingo
Bingo600
Posts: 86
Joined: Sat Dec 21, 2019 3:56 pm

Re: dhrystone and whetstone benchmarks

Post by Bingo600 »

I have a Black F407
https://www.aliexpress.com/item/4000103742703.html

How do you upload to that one ?
DFU or SWD ??

I t has some buttons : (Left) RST + K_UP - (Right) KD + ??? (bad silkscreen)
I tried RST + K_UP (thought upload) .. But it doesnt go into DFU mode.
Edit: Ahh K_UP = Wakeup


I'm lazy - SWD means read pin-doc :oops:

/Bingo
Last edited by Bingo600 on Sun Jan 26, 2020 10:26 am, edited 1 time in total.
Bingo600
Posts: 86
Joined: Sat Dec 21, 2019 3:56 pm

Re: dhrystone and whetstone benchmarks

Post by Bingo600 »

407VE.png
407VE.png (57.37 KiB) Viewed 5358 times
-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.57 Seconds         25   Passes (x 100)

Use 97  passes (x 100)

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

N1 floating point     -1.12475013732910156        81.327              0.023
N2 floating point     -1.12274742126464844        57.431              0.227
N3 if then else        1.00000000000000000                 167.325    0.060
N4 fixed point        12.00000000000000000                 315.000    0.097
N5 sin,cos etc.        0.49909299612045288                   1.292    6.246
N6 floating point      0.99999982118606567        59.255              0.883
N7 assignments         3.00000000000000000                  71.702    0.250
N8 exp,sqrt etc.       0.75110614299774170                   1.654    2.181

MWIPS                                             97.322              9.967
Bingo600
Posts: 86
Joined: Sat Dec 21, 2019 3:56 pm

Re: dhrystone and whetstone benchmarks

Post by Bingo600 »

F407ZE.png
F407ZE.png (57.3 KiB) Viewed 5357 times
F407ZE -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.57 Seconds         25   Passes (x 100)

Use 97  passes (x 100)

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

N1 floating point     -1.12475013732910156        81.327              0.023
N2 floating point     -1.12274742126464844        57.685              0.226
N3 if then else        1.00000000000000000                 167.325    0.060
N4 fixed point        12.00000000000000000                 315.000    0.097
N5 sin,cos etc.        0.49909299612045288                   1.292    6.246
N6 floating point      0.99999982118606567        59.255              0.883
N7 assignments         3.00000000000000000                  71.990    0.249
N8 exp,sqrt etc.       0.75110614299774170                   1.654    2.182

MWIPS                                             97.332              9.966

Post Reply

Return to “General discussion”