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 7934205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:34:37+00:00 2026-06-03T21:34:37+00:00

I am working on a very low level part of the application in which

  • 0

I am working on a very low level part of the application in which performance is critical.

While investigating the generated assembly, I noticed the following instruction:

lea eax,[edx*8+8]

I am used to seeing additions when using memory references (e.g. [edx+4]), but this is the first time I see a multiplication.

  • Does this mean that the x86 processor can perform simple multiplications in the lea instruction?
  • Does this multiplication have an impact on the number of cycles needed to execute the instruction?
  • Is the multiplication limited to powers of 2 (I would assume this is the case)?

Thanks in advance.

  • 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-03T21:34:38+00:00Added an answer on June 3, 2026 at 9:34 pm

    To expand on my comment and to answer the rest of the question…

    Yes, it’s limited to powers of two. (2, 4, and 8 specifically) So no multiplier is needed since it’s just a shift. The point of it is to quickly generate an address from an index variable and a pointer – where the datatype is a simple 2, 4, or 8 byte word. (Though it’s often abused for other uses as well.)

    As for the number of cycles that are needed: According to Agner Fog’s tables it looks like the lea instruction is constant on some machines and variable on others.

    On Sandy Bridge there’s a 2-cycle penalty if it’s “complex or rip relative”. But it doesn’t say what “complex” means… So we can only guess unless you do a benchmark.

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

Sidebar

Related Questions

I'm working on scanning application at a low level where I'm not very comfortable
I have developed a simple location aware iPhone application which is functionally working very
Currently I'm prototyping search with Lucene.Net-2.0-004 on a web application. It's working very well,
I would like to handle HTTP on very low level - at the moment
I'm working on some applications that require very low latency and push a lot
I recently started diving into low level OS programming. I am (very slowly) currently
I'm working on creating an app that allows very low bandwidth communication via high
I'm working on a project in Tableau (which uses functions very similar to Excel,
My IDE has been working very well, until today. When I try to compile
I've been working very long on trying to straighten this out, but I just

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.