Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

CPU Instruction Mix CPI

Estimate weighted cycles per instruction for two measured instruction classes.

Developer workspace● Runs in your browser
01 Your input
02 Your result
View or copy raw result data
FormulaWeighted CPI = fast*(1-fraction/100)+slow*fraction/100; Estimated execution time = instructions*(fast*(1-fraction/100)+slow*fraction/100)/(ghz*1000)

Made for real tasks

  • Estimate weighted cycles per instruction for two measured instruction classes.
Explore step-by-step workflows →

Worked example

Inputs

Expensive instruction share
20 %
Other instruction CPI
1 cycles/instruction
Expensive instruction CPI
5 cycles/instruction
Instruction count
1000 millions
CPU frequency
3 GHz

Expected results

Weighted CPI
1.8 cycles/instruction
Estimated execution time
0.6 s

Load the example in the workspace to reproduce these results. Display rounding does not change the underlying calculation.

How to use this tool

  1. Enter expensive instruction share, other instruction cpi, expensive instruction cpi, instruction count, cpu frequency in the displayed units.
  2. Calculate the scenario, then compare it with measurements before changing a system.

Try this example

{
  "fraction": 20,
  "fast": 1,
  "slow": 5,
  "instructions": 1000,
  "ghz": 3
}

Accuracy and scope

Measured effective CPI classes; modern out-of-order overlap means raw instruction latencies cannot simply be used as CPI.

Is my data uploaded?

This tool runs locally in your browser. Input and output are not sent to a processing server. Copy or download your result before leaving the page.