Benchmarking test code for various operations
Fork of benchmark by
Benchmarking the performance of various mbed boards that I have
Using the excellent code by Igor, I have benchmarked the performance of the following platforms:
- mbed LPC1768
- mbed LPC11U24
- EA LPC4088 QuickStart Board
- mbed LPC1114FN28
- NUCLEO-F302R8
- FRDM-K64F
- NUCLEO-F411RE
- LPCXpresso4337
- Seeed Arch Max
- mbed LPC1768
The data can be found in this link: https://docs.google.com/spreadsheets/d/1d5BcNvC341xvktRJ6DC3wdlI6wuv0FjCvCqHAnfINmQ/pubhtml
For the hyperbolic tan (tanh) function, I made a graph showing how the clock speed of various ARM Cortex-M4 boards with FPU affects the computation time in microseconds.
Diff: main.cpp
- Revision:
- 2:fc68d524dd7d
- Parent:
- 1:f91e7bc0e244
- Child:
- 3:ec2e20a9bd03
--- a/main.cpp Mon Aug 17 20:14:39 2015 +0000 +++ b/main.cpp Thu Nov 19 21:41:58 2015 +0000 @@ -13,13 +13,13 @@ */ #define ITERATIONS 1000000 // Number of calculations. -#define CLOCK 100 // Clock freqency in MHz +#define CLOCK 48 // Clock freqency in MHz Timer timer; // Timer.. Serial pc(USBTX, USBRX); float number_of_cycles, single_operation_time; -//volatile int a, b, c; // Int operands and result. Must be volatile! -volatile float a, b, c; // Float operands and result. Must be volatile! +volatile int a, b, c; // Int operands and result. Must be volatile! +//volatile float a, b, c; // Float operands and result. Must be volatile! //volatile double a, b, c; // Float operands and result. Must be volatile! int main() { @@ -44,7 +44,7 @@ this for loop. */ for (i=0; i<ITERATIONS; i++){ -// a = b; + a = b; // c = a+b; // c = a*b; // c = a/b;