Browse Definitions :
Definition

speculative execution

Speculative execution is an optimization technique in which a processor (CPU) performs a series of tasks before it is prompted to, in order to have the information ready if it is required at any point. Speculative execution uses concurrent processing and out-of-order execution (OoOE) to anticipate and fetch data that might be required at a latter point. It eliminates the stall experienced while waiting for appropriate instructions to arrive for the next step.  Speculative execution uses branch prediction to guess which instructions will most likely be needed in the near future and data flow analysis to arrange the instructions for optimal execution (instead of executing them in the order they came in). The goal is to reduce the total execution time and improve the overall CPU performance.

First, the branch predictor guesses which branch is most likely to be taken in the process and then gathers the next set of instructions associated with that branch. It will then begin speculatively executing them before it knows which of the two branches it will actually be using. If the branch predictor guessed correctly, then the instructions are already lined up and there will be no execution delay. If the branch predictor guessed incorrectly, then the system loads the appropriate information and proceeds with those instructions instead. However, accuracy rates for branch predictors are typically above 95 percent, so the need to reload new information is uncommon.

With in-order execution, a pipeline stall will stop the entire CPU until the issue is solved. Also, a gap is created between CPU and main memory speeds. As the gap grows, the time spent waiting for the main memory to deliver information to the CPU grows as well, thus increasing the time spent waiting on the execution. Speculative execution closes this gap by keeping the CPU busy and minimizing the time it spends idling, thus improving the overall performance of the system.

Speculative execution was adopted by Intel, who started using OoOE with its microprocessors Pentium Pro and Pentium II, Advanced Micro Devices (AMD), who introduced it with the K5 microprocessor, and Advanced RISC Machines (ARM), who began using it with the Cortex A9 microprocessor.

While speculative execution can improve the performance of a computer system, it is important to note that it may also cause security flaws such as meltdown CPU vulnerability.

This was last updated in June 2019

Continue Reading About speculative execution

Networking
Security
  • identity management (ID management)

    Identity management (ID management) is the organizational process for ensuring individuals have the appropriate access to ...

  • single sign-on (SSO)

    Single sign-on (SSO) is a session and user authentication service that permits a user to use one set of login credentials -- for ...

  • fraud detection

    Fraud detection is a set of activities undertaken to prevent money or property from being obtained through false pretenses.

CIO
  • IT budget

    IT budget is the amount of money spent on an organization's information technology systems and services. It includes compensation...

  • project scope

    Project scope is the part of project planning that involves determining and documenting a list of specific project goals, ...

  • core competencies

    For any organization, its core competencies refer to the capabilities, knowledge, skills and resources that constitute its '...

HRSoftware
  • Workday

    Workday is a cloud-based software vendor that specializes in human capital management (HCM) and financial management applications.

  • recruitment management system (RMS)

    A recruitment management system (RMS) is a set of tools designed to manage the employee recruiting and hiring process. It might ...

  • core HR (core human resources)

    Core HR (core human resources) is an umbrella term that refers to the basic tasks and functions of an HR department as it manages...

Customer Experience
  • martech (marketing technology)

    Martech (marketing technology) refers to the integration of software tools, platforms, and applications designed to streamline ...

  • transactional marketing

    Transactional marketing is a business strategy that focuses on single, point-of-sale transactions.

  • customer profiling

    Customer profiling is the detailed and systematic process of constructing a clear portrait of a company's ideal customer by ...

Close