Hi Dennis, Thanks for that explanation. I didn't know that, but the explanation you gave makes sense.
On 2/20/12, Dennis Towne <[email protected]> wrote: > Thomas and Jim, > > Most of the time, the executable size is dominated by the linked in > libraries, which are usually a lot bigger than the source. However, > the size of the executable is very dependent on the programming > language used and can be either bigger or smaller than the source code > depending on the language. The target machine is also a big factor in > the executable size. > > For example, assembly language programs almost always compile down to > smaller machine code; however, basic programs almost always compile > down to much larger programs than the original source, even including > comments. This is because assembly language is a very detailed, low > level language, wheras in basic a single print statement can require > hundreds or thousands of instructions to be compiled correctly. > > As a real world example, the Alter Aeon server code is written in c++, > and the source code size is 9.5 megabytes. The final executable is > 14.3 megabytes. This is a particularly good example, because the > server uses very few libraries and is the executable size is almost > completely server code instead of library code. > > This is on a 64 bit linux machine. Our previous host server was a 32 > bit server, and on 32 bit machines the executable size would only be > about ten megabytes instead of 14. > > In summary, It's really hard to make general assumptions about > executable versus code size like 'compiled code is always smaller than > the source'. The different languages and architectures allow for > extremely wide variation. > > Just FYI. > > Dennis Towne > --- Gamers mailing list __ [email protected] If you want to leave the list, send E-mail to [email protected]. You can make changes or update your subscription via the web, at http://mail.audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/[email protected]. If you have any questions or concerns regarding the management of the list, please send E-mail to [email protected].
