Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7622567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:29:08+00:00 2026-05-31T04:29:08+00:00

i am trying to reach the single threaded FP peak performance for my nehalem

  • 0

i am trying to reach the single threaded FP peak performance for my nehalem cpu to detect the performance anomalies of my application, but i can’t seem to reach it. The clock speed is 3.2 GHz, and i want to achieve the peak FP performance of the cpu without using SSE instructions and multi-threading.

As i understand it single precision FP addition and multiplication can be done in parallel each clock cycle, yielding a maximum performance of 2 * 3.20 = 6.4 GFLOPS/sec.

However i am not able to reach this performance with a simple piece of code:

int iterations = 1000000;
int flops_per_iteration = 2;
int num_flops = iterations * flops_per_iterations;

for(int i=0; i<iterations; i++)
{
    a[i] = i; 
    b[i] = i*2;
    c[i] = i*3;
}

tick(&start_time);

for(int i = 0; i < iterations; i++){
    a[i] *= b[i];
    c[i] += b[i];
}

time = tock(&start_time);

printf("Performance: %0.4f GFLOPS \n", flops/(time*pow(10,-3)*pow(10,9)));

This piece of code gives me a performance of: ~1.5 GFLOPS instead of 6.4 GFLOPS.

Anybody has any other example that can approach the peak performance without using MT and SSE, or has any idea my code doesn’t?

Thanks in advance

* Update: Added Assembly Code of the hot loop: *

Address Assembly
Block 17:
0x4013a5    movssl  (%rdi,%rax,4), %xmm2
0x4013aa    movssl  (%r8,%rax,4), %xmm0
0x4013b0    movssl  (%rsi,%rax,4), %xmm1
0x4013b5    mulss %xmm2, %xmm0
0x4013b9    addss %xmm1, %xmm2
0x4013bd    movssl  %xmm0, (%r8,%rax,4)
0x4013c3    movssl  %xmm2, (%rsi,%rax,4)
0x4013c8    inc %rax
0x4013cb    cmp %rcx, %rax
0x4013ce    jb 0x4013a5 <Block 17>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:29:10+00:00Added an answer on May 31, 2026 at 4:29 am

    To give a performance of 6.4 GFLOPS, your CPU should perform 10 instructions in one clock. Or 7 instructions if unrolled. This is just not possible. You cannot get more than 4 instructions/clock on this processor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to reach peak performance of each SM from the code below. The
I'm trying to reach internet through my Android app, but I both succeed and
I'm trying to reach an element in an object array. But I couldn't succeed.
I'm trying to reach a japanese path. Something like C:\日本語\asd.dll, but I have some
I am trying an example at Spring 3 with MongoDB. I can reach MongoDB's
Hi I'm trying to reach this goal but as far as I am, I've
I'm trying to reach a file in network but it gives me the error
I am trying to reach the following result here I know how to configure
Trying to make a make generic select control that I can dynamically add elements
Trying to make a MySQL-based application support MS SQL, I ran into the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.