Gledao sam samo delfi 7, a u knjizi mastering 7 negde na pocetku pise da se borlandovi preogrameri trude da program i kod itd budu efikasniji, manji, brzi... Primer koji daju
Code:
program MiniSize;
uses
Windows;
{$R *.RES}
var
nSize: Integer;
hFile: THandle;
strSize: String;
begin
// open the current file and read the size
hFile := CreateFile (PChar (ParamStr (0)),
0, FILE_SHARE_READ, nil, OPEN_EXISTING, 0, 0);
nSize := GetFileSize (hFile, nil);
CloseHandle (hFile);
// copy the size to a string and show it
SetLength (strSize, 20);
Str (nSize, strSize);
MessageBox (0, PChar (strSize),
'Mini Program', MB_OK);
end.
If you compile this program with Delphi 5, you obtain an executable size of 18,432 bytes. Delphi 6 reduces this size to only 15,360 bytes, trimming about 3 KB. In Delphi 7, the size is only slightly greater, at 15,872 bytes. By replacing the long string with a short string and modifying the code a little, you can trim the program further, to less than 10 KB. (You'll end up removing the string support routines and also the memory allocator, something possible only in programs using exclusively low-level calls.) You can find both versions in the source code of the example file.
Sad je samo pitanje koliko ti znace tih nekoliko kilobajta