Instruction path length

CPU path length
In computer performance, the instruction path length is the number of machine code instructions required to execute a section of a computer program.wikipedia
40 Related Articles

Computer performance

performanceprocessing powercomputing power
In computer performance, the instruction path length is the number of machine code instructions required to execute a section of a computer program.
Computer performance metrics (things to measure) include availability, response time, channel capacity, latency, completion time, service time, bandwidth, throughput, relative efficiency, scalability, performance per watt, compression ratio, instruction path length and speed up.

Software metric

software metricsmetricmetrics
Expressed in terms of instruction path length, this metric would be reduced in this instance by a massive factor of 50 – a reason why actual instruction timings might be a secondary consideration compared to a good choice of algorithm requiring a shorter path length.

Program optimization

optimizationoptimizedoptimizations
Generally, these serve to reduce the total instruction path length required to complete the program and/or reduce total memory usage during the process.

Machine code

machine languagenative codemachine instruction
In computer performance, the instruction path length is the number of machine code instructions required to execute a section of a computer program.

Computer program

programprogramscomputer programs
In computer performance, the instruction path length is the number of machine code instructions required to execute a section of a computer program.

Algorithm

algorithmsalgorithm designcomputer algorithm
Expressed in terms of instruction path length, this metric would be reduced in this instance by a massive factor of 50 – a reason why actual instruction timings might be a secondary consideration compared to a good choice of algorithm requiring a shorter path length. The total path length for the entire program could be deemed a measure of the algorithm's performance on a particular computer hardware.

Computer hardware

hardwarepersonal computer hardwaredevice
The total path length for the entire program could be deemed a measure of the algorithm's performance on a particular computer hardware.

Benchmark (computing)

benchmarkbenchmarksbenchmarking
When executing a benchmark program, most of the instruction path length is typically inside the program's inner loop.

Inner loop

When executing a benchmark program, most of the instruction path length is typically inside the program's inner loop.

Cache (computing)

cachecachingcache memory
Before the introduction of caches, the path length was an approximation of running time, but in modern CPUs with caches, it can be a much worse approximation, with some load instructions taking hundreds of cycles when the data is not in cache, or orders of magnitude faster when in cache (even the same instruction in another round in a loop).

Assembly language

assemblerassemblyassembly code
Since there is, typically, a one-to-one relationship between assembly instructions and machine instructions, the instruction path length is frequently taken as the number of assembly instructions required to perform a function or particular section of code.

Lookup table

lookuplook-up tabletable lookup
Performing a simple table lookup on an unsorted list of 1,000 entries might require perhaps 2,000 machine instructions (on average, assuming uniform distribution of input values), while performing the same lookup on a sorted list using a binary search algorithm might require only about 40 machine instructions, a very considerable saving.

Sorting algorithm

sortingsortsorted
Performing a simple table lookup on an unsorted list of 1,000 entries might require perhaps 2,000 machine instructions (on average, assuming uniform distribution of input values), while performing the same lookup on a sorted list using a binary search algorithm might require only about 40 machine instructions, a very considerable saving.

Sorting

sortedsortsascending order
Performing a simple table lookup on an unsorted list of 1,000 entries might require perhaps 2,000 machine instructions (on average, assuming uniform distribution of input values), while performing the same lookup on a sorted list using a binary search algorithm might require only about 40 machine instructions, a very considerable saving.

Source lines of code

lines of codeLOCSLOC
The instruction path length of an assembly language program is generally vastly different than the number of source lines of code for that program, because the instruction path length includes only code in the executed control flow for the given input and does not include code that is not relevant for the particular input, or unreachable code.

Unreachable code

goto failunreachablesloppily indented code might lead the reader astray
The instruction path length of an assembly language program is generally vastly different than the number of source lines of code for that program, because the instruction path length includes only code in the executed control flow for the given input and does not include code that is not relevant for the particular input, or unreachable code.

Instruction set simulator

Instruction set simulationusage of particular instructionsinstruction accurate
Since one statement written in a high-level language can produce multiple machine instructions of variable number, it is not always possible to determine instruction path length without, for example, an instruction set simulator – that can count the number of 'executed' instructions during simulation.

Binary search algorithm

binary searchbinarybinary chop
Performing a simple table lookup on an unsorted list of 1,000 entries might require perhaps 2,000 machine instructions (on average, assuming uniform distribution of input values), while performing the same lookup on a sorted list using a binary search algorithm might require only about 40 machine instructions, a very considerable saving.

Self-modifying code

self-modifyingrun-time code generationRuntime Code Generation
In computer science, self-modifying code is code that alters its own instructions while it is executing – usually to reduce the instruction path length and improve performance or simply to reduce otherwise repetitively similar code, thus simplifying maintenance.