Florian Klaempfl a écrit :
George Birbilis schrieb:
let me ask you a few questions:
are you still using 1.44 floppies?
are you sending compiled execs 20 times a day via 56k
modem connection?
no? then why 1 or 2 mb bigger is so bad for you?
btw, delphi is NOT multiplatform. whant smaller exec
linux+windows?
buy delphi, buy kylix, have a hard time porting
everything and tuning
everything to work similar.
size is a cost of multiplatform and RAD+functionality power.
enough arguments? or should i add more?
I can't say anything.
I know this is an old thread, but regarding Delphi silly .exe bloating, for
command-line apps, if you removed some units like forms or sysutils and uses
windows unit (and respective API - even for just one call to MessageBox
instead of ShowMessage) the .EXE would become say 50kb instead of 500kb.
The abstraction layers of sysutils and classes simply require space. Either
people has to live with it or don't use it. E.g. a simple uses of sysutils pulls
in a lot of code because of the rte to exception conversion including a lot of
resourcestrings etc.
Yes but this is not the only explanation. For instance, consider the
following small function
function IWeight(A: PBigInt): SInt32;
begin
Result := RawWeight(A^.Digits,A^.Size);
end;
When it is not inlined, Turbo Delphi codes it this way:
push ebp
mov ebp, esp
mov edx, [eax+$08]
mov eax, [eax]
call RawWeight
pop ebp
ret
That's almost perfect. Now, here is the way Free Pascal (2.0.4) codes
it:
push ebp
mov ebp, esp
sub esp, 8
mov [ebp-8], ebx
mov [ebp-4], esi
mov ebx, eax
mov edx, [ebx+8]
mov eax, [ebx]
call KERNEL_RAWWEIGHT$PUINT32$LONGINT$$LONGINT
mov esi, eax
mov ebx, [ebp-8]
mov esi, [ebp-4]
leave
ret
This is simply catastrophic. There are 7 useless instructions, 7 out of
14. Here, the code is twice bigger and this has nothing to do with
resourcestrings.
Btw, why does Free Pascal make use of the esi register?
M. Martin
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives