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:
“Cats are the ultimate narcissists. You can tell this because of all the time they spend on personal grooming. Dogs arent like this. A dogs idea of personal grooming is to roll in a dead fish. Dogs spend their time thinking about doing good deeds for their masters, or sleeping.”
—James Gorman (b. 1949)
“Motion or change, and identity or rest, are the first and second secrets of nature: Motion and Rest. The whole code of her laws may be written on the thumbnail, or the signet of a ring.”
—Ralph Waldo Emerson (18031882)