In computer programming, dead code is code in the source code of a program which is executed but whose result is never used in any other computation. The execution of dead code wastes computation time as its results are never used.
While the result of a dead computation may never be used, the dead code may raise exceptions or affect some global state, thus removal of such code may change the output of the program and introduce unintended bugs. Compiler optimizations are typically conservative in their approach to dead code removal if there is any ambiguity as to whether removal of the dead code will affect the program output.
Other articles related to "dead code, code, dead":
... It simultaneously removes some kinds of dead code and propagates constants throughout a program ... However, it is strictly more powerful than applying dead code elimination and constant propagation in any order or any number of repetitions ... by performing abstract interpretation of the code in SSA form ...
... Dead code elimination is a form of compiler optimization in which dead code is removed from a program ... Dead code analysis can be performed using live variable analysis, a form of static code analysis and data flow analysis ... This is in contrast to unreachable code analysis which is based on control flow analysis ...
... users to keep interacting with webpages while Internet Explorer 9 generates even faster code ... Microsoft provided information that its new javascript engine uses dead code elimination optimization for faster performance, which included a small section of code in the SunSpider test as dead code ... this further, showing that Internet Explorer 9's preview 3 dead code elimination had bugs, providing test cases exposing these bugs resulting in wrong ...
... In compiler theory, dead code elimination is a compiler optimization to remove code which does not affect the program results ... Removing such code has two benefits it shrinks program size, an important consideration in some contexts, and it allows the running program to avoid executing irrelevant ... Dead code includes code that can never be executed (unreachable code), and code that only affects dead variables, that is, variables that are irrelevant to the program ...
Famous quotes containing the words code and/or dead:
“Acknowledge your will and speak to us all, This alone is what I will to be! Hang your own penal code up above you: we want to be its enforcers!”
—Friedrich Nietzsche (18441900)
“The North is full of tangled things and texts and aching eyes
And dead is all the innocence of anger and surprise,
And Christian killeth Christian in a narrow dusty room,
And Christian dreadeth Christ that hath a newer face of doom,
And Christian hateth Mary that God kissed in Galilee,”
—Gilbert Keith Chesterton (18741936)