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

  • Home
  • SEARCH
  • 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 8498649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:27:38+00:00 2026-06-11T00:27:38+00:00

We know that modern processors execute instructions such as cosine and sin directly on

  • 0

We know that modern processors execute instructions such as cosine and sin directly on the processor as they have opcodes for it. My question is how much cycles these instructions normally take. Do they take constant time or depend upon input parameters?

  • 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-06-11T00:27:40+00:00Added an answer on June 11, 2026 at 12:27 am

    Talking about “cycles for an instruction” for modern processors got to be difficult quite a while ago. Processors these days contain multiple execution cores, their operation can overlap and can execute out-of-order.

    A good example of the essential consideration is given in the Intel processor manual, volume 4, appendix C. It breaks down instruction timing by Latency and Throughput. Latency is the number of cycles an execution core requires to complete a micro-op. Throughput is the number of cycles required to have the execution unit accept the same instruction again. Throughput is generally lower than Latency, including having fractional values in the table. A side-effect of having more than one execution unit of the same type. The type is important, that tells you whether instructions can overlap.

    Maybe you got the essential message here: it greatly depends what other instructions surround the code you are interested in timing. Those other instructions may well execute concurrently with the expensive one. At which point they take, effectively, 0 cycles. Or they may not, stalling the pipeline because the execution unit is busy with a previous instruction. The kind of details that programmers that write code optimizers care a lot about.

    Some sample data from the manual, picking the most modern core in the tables:

    • FMUL, latency = 7, throughput = 2, FP_MUL execution unit
    • FDIV, latency = 6, throughput = 5, unspecified unit
    • FSQRT, latency = 38, throughput = 43, FP_DIV exeution unit
    • FSIN, latency = 160-180, throughput = 130, unspecified unit

    A much better bang on SIMD instructions.

    The only meaningful thing to do is measure, not assume.

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

Sidebar

Related Questions

I know that modern CPUs can execute out of order, However they always retire
I know that modern browsers generally have two render mode: standard mode and quirk
I know that this sort of question has been asked here before, but still
I know that Java have its own garbage collection, but sometimes I want to
I know that immutable objects always have the same state, the state in which
I know, that modern compilers can do procedural integration not only with functions defined
I know that might sound like a stupid question since it's a trivial feature
Now i know that this one is actually not a very technical question but
I have heard about code bloats in context of C++ templates. I know that
I know that modern *nix OSes allow to open file so that data are

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.