You are viewing an old revision of this page.
The process of improving SourceCode and/or its resulting MachineCode with regard to a certain aspect. Such aspects include:
- Speed:
- Does what it says: the program runs faster.
This is the aspect commonly referred to when the term Optimisation is used.
- Object code size:
- Reduces the size of large applications (such as browsers, office suites, and the like) or frequently downloaded code (such as scripts and applets on WebSites).
As a side effect, Cache locality of the code improves, so performance will often benefit as well.
This is the second most commonly referred to aspect of Optimisation.
- Compilation time:
- Improves the perceived responsiveness of code compiled dynamically in reaction to user requests.
- Threading:
- Leverages the resources of SMP systems better, because MultiThreaded tasks can take advantage of multiple CPUs at once.
In practice, you always need a balance among these.
Originally, StuartYeates also listed:
- Flexibility:
- Reduces the effort and thus cost of designing and implementing new features.
- Portability:
- Allows deploying the SourceCode on more than one platforms.
This often requires avoiding other, platform-specific Optimisation techniques.
Personally, I think it is a stretch to file these as Optimisations. I have never heard them referred to as such, in any case. An appropriate term here is probably Refactoring.
--
AristotlePagaltzis