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.
Famous quotes containing the words dead and/or code:
“A living thing is distinguished from a dead thing by the multiplicity of the changes at any moment taking place in it.”
—Herbert Spencer (18201903)
“...I had grown up in a world that was dominated by immature age. Not by vigorous immaturity, but by immaturity that was old and tired and prudent, that loved ritual and rubric, and was utterly wanting in curiosity about the new and the strange. Its era has passed away, and the world it made has crumbled around us. Its finest creation, a code of manners, has been ridiculed and discarded.”
—Ellen Glasgow (18731945)