Community
cancel
Showing results for 
Search instead for 
Did you mean: 
kim__seongik
Beginner
142 Views

Comparison with theoretical peak performance of CPU

Hello !!

 

I did some test with Intel Xeon Silver 4216 @ 2.10GHz.

I used only one core for checking theoretical peak performance of CPU.

I checked the performance of CPU by using some C source code.

 

 

#include <stdio.h>

 

#include "timer.h"

 

int main() {

  timer_init(1);

  long N = 1000000000;

  float s1 = 1;

  float s2 = 1;

  float s3 = 1;

  float s4 = 1;

  float s5 = 1;

  timer_start(0);

  for (long i = 0; i < N; ++i) {

    s1 += 3;

    s2 += 4;

    s3 += 5;

    s4 += 6;

    s5 += 7;

  }

  timer_stop(0);

  printf("time = %f s\n", timer_read(0));

  printf("s1 = %f\n", s1);

  printf("s2 = %f\n", s2);

  printf("s3 = %f\n", s3);

  printf("s4 = %f\n", s4);

  printf("s5 = %f\n", s5);

  timer_finalize();

  return 0;

}

 

 

That code is just floating point process "Plus".

By using that code when put only one float variable the performance of CPU is 0.7GFlops.

However put 10 float variables case the performance of CPU is over the 6 GFlops.

 

So my questions are below.

1. Why this situation happen?

 

2. When chaning "Plus" to "multiplication " case has also same result. Why ?? I want to know the reason.

 

3. And also changing the float to double the results are also same.
I want to know the reason.. 

 

THank you for  reading!!

0 Kudos
1 Reply
IntelSupport
Community Manager
133 Views

Hello kim__seongik


Thank you for posting in the Intel Community. 


I would like to share with you the Export Compliance Metrics for Intel® Microprocessors (https://www.intel.com/content/www/us/en/support/articles/000005755/processors.html) for general information about the Gigaflops (GFLOPS) and the Adjusted Peak Performance (APP) values for Intel® Processors.


In reference to the questions you have based on the test that you have done I would like to investigate more, I would be posting back as soon as possible.


Regards,

Leonardo C.


Intel Customer Support Technician


Reply