November 1999
Intermediate to advanced
336 pages
6h 29m
English
As we have already discussed, the performance advantages of avoiding expensive method invocations is only half of the inlining performance story. The other half is cross-call optimizations. Cross-call optimizations allow the compiler to perform source and machine level optimizations to a method based on a more expansive contextual view of its invocation. These optimizations generally take the form of doing things at compile-time to avoid the necessity of doing them at run-time; for example, simple things like converting
float x = 90.0; --- // nothing that changes x's value float y = sin(x);
to
float x = 90.0; --- float y = 1.0; // sin(90) = 1
This example, perhaps unlikely within the context of a single method, can ...
Read now
Unlock full access