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:
“Study me then, you who shall lovers be
At the next world, that is, at the next spring:
For I am every dead thing,
In whom love wrought new alchemy.
For his art did express
A quintessence even from nothingness,
From dull privations, and lean emptiness:
He ruined me, and I am re-begot
Of absence, darkness, death: things which are not.”
—John Donne (15721631)
“Many people will say to working mothers, in effect, I dont think you can have it all. The phrase for have it all is code for have your cake and eat it too. What these people really mean is that achievement in the workplace has always come at a priceusually a significant personal price; conversely, women who stayed home with their children were seen as having sacrificed a great deal of their own ambition for their families.”
—Anne C. Weisberg (20th century)