Help


from Wikipedia
« »  
; Programming language – independent vs language-dependent: Most high-level languages share common programming constructs and abstractions: decision ( if, switch, case ), looping ( for, while, repeat .. until, do .. while ), and encapsulation ( structures, objects ).
Thus similar optimization techniques can be used across languages.
However, certain language features make some kinds of optimizations difficult.
For instance, the existence of pointers in C and C ++ makes it difficult to optimize array accesses ( see alias analysis ).
However, languages such as PL / 1 ( that also supports pointers ) nevertheless have available sophisticated optimizing compilers to achieve better performance in various other ways.
Conversely, some language features make certain optimizations easier.
For example, in some languages functions are not permitted to have side effects.
Therefore, if a program makes several calls to the same function with the same arguments, the compiler can immediately infer that the function's result need be computed only once.
In languages where functions are allowed to have side effects, another strategy is possible.
The optimizer can determine which function has no side effects, and restrict such optimizations to side effect free functions.
This optimization is only possible when the optimizer has access to the called function.

2.177 seconds.