??? 07/01/05 09:11 Read: times |
#96377 - Not at all Responding to: ???'s previous message |
"That's asking too much."
Seems quite reasonable to be. "In your simple example, yes it could, but for a global implemetation, it would have to analyze the entire for loop (some I have seen have had hundereds of lines) to see if a little thing like ralph[a] or so was hidden somewhere in the loop." The compiler already translates a high level language into machine code, performs local and global optimisations and all sorts of clever stuff. Do you really think it might have any trouble locating a reference to a variable in a loop? "In your example it would be bad coding to even have b since a could be used instead." It was a deliberately simple example intended to stress the idea that the loop variable was not used in the body. "Anyhow, if the optimizer et al were "perfect" the advantage of most knowledge would disappear and the guru would be no better than the tyro" So, you'd rather the tools didn't put you out of a job? |