| PLEX86 | ||
Thou shalt have no other gods before the ANSI C standard 1561Thou shalt have no other gods before the ANSI C standard 1562 with kind report very surprising, Correct. AFAICT the most effective approach has been to do the following: * Formal proofs (ie: that maths... Randy Howard That's one of the differences between C and PL-I. C library functions are just that. As someone pointed out they can be replaced at will. PL-I BUILTIN functions are part of the compiler. The names can be re-used as user-defined functions, but the compiler can recognize that this has been done. That's why I mentioned the inlining -- as long as a function is user-replacable the compiler can't make any buttumptions about the result or possible side-effects, and therefore can't optimize around it. Step one would be inlining, which at least allows the compiler to optimize. Whether it does or not is another question. I'll play with it. BTW, I'm not a C guru. What does the C standard say about the expressions in a 'for' statement? The PL-I standard explicitly states that the step and limit expressions are evaluated once before the start of the loop and saved, so if you say "DO i=1 TO length(x)", 'length(x)' is evaluated once. It sounds like C requires it to be re-evaluated at each iteration, and optimization is required to recognize it as an invariant.
|
||||
Thou shalt have no other gods before the ANSI C standard 1562 Alt Folklore Computers from Newsgroups The #1 Usenet Provider on the Internet
Thou shalt have no other gods before the ANSI C standard 1560 |
||||