Quote:
|
Originally Posted by s1lv3r
 on what planet?
You get faster execution if code is efficient, the smaller the better.
If you can pre-load your executable in memory before someone uses it, then it can artificially shorten load times yet still be a big slug of an application (*cough* acrobat reader *cough*)
|
Try a gcc -O3 optimisation, the code you get executes faster but with a larger executable (although O3 often causes the program to crash). Obviously uneeded code (code bloat) is going to slow down an application, but other tweaks can have the opposite effect which is why I said
can mean faster execution. As an example, one of the GCC optimisations is to 'unroll loops', what this does is, if any while/for loops in your application can have their iterations determined at compile time the loops is removed and replaced with a sequential set of instructions. This results in slightly faster execution as the overhead of loop checking is removed, though the code compiled code is larger than it otherwise would have been (think about the difference that that can make in large applications). Of course, having larger programs resident in memory can result in slowdown, which all goes to show that program performance is far more complex than just looking at memory usage can show.
---------------------
Edit: GCC is a compiler