CompuServe Messages

#optimizer fix

    05-Apr-95 07:47:29
Sb: #46400-#optimizer fix
Fm: Greg Comeau@Comeau Cmptg 72331,3421
To: James Du Bois 72237,32
>I then compiled >it with the optimizer on and now the program works correctly. I was under >the impression that the optimizer only worked on correctly running >programs, and if you optimize a program that doesn't work, it'll still >won't work, but only faster. What I would like to know, what did the >optimizer fix? This is an elusive one and the real answer is nothing is "fixed." I call this and related phenomena “good garbage''. The basic situation is that you changed the rules of the game by optimizing (you *do* now have a different program) and got lucky. Since you know something is wrong, I wouldn't trust it even though it may turn out that the optimizer did generate something that will always do the correct thing. But, until you know that, you don't. And when you do, you'll probably know what was wrong in the first place and resolve it accordingly. There is also danger in ignoring it, and subsequently changing something else, which will expose the problem, perhaps not giving the optimizer the same break (which was no doubt blind luck in the first place) but only after "you know the optimizer fixed it." >Member of the Bermuda Triangle Exploratory Expedition 1992 – 1951 ??