Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-09

Comparison Delphi7/FPC2.4.0 compiled MSEide exe's

14 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Schreiber

Hi,
Some numbers about the MSEide exes compiled as testcase in

System:
win2000, AMD Athlon XP 3000+, 1GB RAM

Delphi 7 FPC
Exe size: 3131392 3689304
Code: 2128524 2138240
Data: 752085 1541256

Startuptime inclusive loading of 42 forms:
Delphi 1.0s FPC 1.19s

20'000 unicode find/replace with big overhead in editor component: Delphi: 2.8s FPC 2.7s (Delphi uses OLE-WideString, FPC uses reference counted UnicodeString)

10'000 Ctrl+LeftClick symbol lookups:
Delphi 2.6s FPC 3.2s

Martin

Reply by email

Adem
to Martin Schreiber

Martin,

Could I have a copy of this exact setup --unless it is too big to send.

Cheers,
Adem

Martin Schreiber wrote 26 lines
Hi, Some numbers about the MSEide exes compiled as testcase in System: win2000, AMD Athlon XP 3000+, 1GB RAM Delphi 7 FPC Exe size: 3131392 3689304 Code: 2128524 2138240 Data: 752085 1541256 Startuptime inclusive loading of 42 forms: Delphi 1.0s FPC 1.19s 20'000 unicode find/replace with big overhead in editor component: Delphi: 2.8s FPC 2.7s (Delphi uses OLE-WideString, FPC uses reference counted UnicodeString) 10'000 Ctrl+LeftClick symbol lookups: Delphi 2.6s FPC 3.2s Martin _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Martin Schreiber
to Florian Klaempfl
Florian Klaempfl wrote 7 lines
Am 13.09.2010 11:15, schrieb Martin Schreiber: > Delphi 7 FPC > Exe size: 3131392 3689304 > Code: 2128524 2138240 > Data: 752085 1541256 Do you use a lot of resource strings?

I can not use resource strings because FPC resource strings are not unicode capable AFAIK.
In MSEgui there are many local classdefs in the form of "
type
ttheclass1 = class(ttheclass);
"
in order to access protected class members (remember my request for "friend units"?).
I also think I remember that FPC sometimes duplicates RTTI in several units, but I am not sure about.

Martin

Reply by email

Graeme Geldenhuys
to Martin Schreiber

Op 2010-09-13 13:47, Martin Schreiber het geskryf:

I can not use resource strings because FPC resource strings are not unicode capable AFAIK.

Probably related to your choice of UCS-2 - I don't really know the specific issues you have, so it is hard to tell. I can say that I have been using resource strings (with unicode text) for ages, but fpGUI and my projects use UTF-8 internally, which obviously works around (mostly) the "lack of Unicode support in FPC" because UTF-8 text can be treated as a byte array.

in order to access protected class members (remember my request for "friend units"?).

I would love this one too. What I didn't know is that we take a penalty for using local classdefs to get access to protected methods.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Martin Schreiber
to Graeme Geldenhuys
Graeme Geldenhuys wrote 10 lines
Op 2010-09-13 13:47, Martin Schreiber het geskryf: > I can not use resource strings because FPC resource strings are not > unicode capable AFAIK. Probably related to your choice of UCS-2 - I don't really know the specific issues you have, so it is hard to tell. I can say that I have been using resource strings (with unicode text) for ages, but fpGUI and my projects use UTF-8 internally, which obviously works around (mostly) the "lack of Unicode support in FPC" because UTF-8 text can be treated as a byte array.

It works because you don't use a BOM or -Fcutf8 -> you can't use UnicodeString without converting from/to utf-8 manually in code. And sorry, FPC does not "lack of Unicode support", it has very good Unicode support with exception of missing resourcestrings.

Martin

Reply by email

Daniël Mantione
to Graeme Geldenhuys: Op 2010-09-13 13:47, Martin Schreiber het geskryf: Probably related to your choice of…

Op Mon, 13 Sep 2010, schreef Graeme Geldenhuys:

Show quoted text 10 lines
Op 2010-09-13 13:47, Martin Schreiber het geskryf: > > I can not use resource strings because FPC resource strings are not unicode > capable AFAIK. Probably related to your choice of UCS-2 - I don't really know the specific issues you have, so it is hard to tell. I can say that I have been using resource strings (with unicode text) for ages, but fpGUI and my projects use UTF-8 internally, which obviously works around (mostly) the "lack of Unicode support in FPC" because UTF-8 text can be treated as a byte array.

Please don't turn this discussion into a UTF-8 versus UCS-2/UTF-16 debate.

Daniël

Reply by email

Florian Klaempfl
to Martin Schreiber: I can not use resource strings because FPC resource strings are not unicode capable AFAIK.
Martin Schreiber wrote 17 lines
On Monday, 13. September 2010 13.24:18 Florian Klaempfl wrote: > Am 13.09.2010 11:15, schrieb Martin Schreiber: >> Delphi 7 FPC >> Exe size: 3131392 3689304 >> Code: 2128524 2138240 >> Data: 752085 1541256 > > Do you use a lot of resource strings? I can not use resource strings because FPC resource strings are not unicode capable AFAIK. In MSEgui there are many local classdefs in the form of " type ttheclass1 = class(ttheclass); " in order to access protected class members

This should not create any additional data.

Reply by email

Graeme Geldenhuys
to Daniël Mantione: Op Mon, 13 Sep 2010, schreef Graeme Geldenhuys: Please don't turn this discussion into a…

Op 2010-09-13 14:34, Daniël Mantione het geskryf:

Please don't turn this discussion into a UTF-8 versus UCS-2/UTF-16 debate.

I had no such intension. I guess I was simply stating the obvious - that FPC resourcestrings might have issue with other Unicode formats (which wouldn't surprise me), but that it does work with UTF-8 strings (luckily). Then again, even with UTF-8, FPC still fails in many Unicode areas (as expected since it doesn't support Unicode - contrary to what Martin says) - like locale variables that require more that 1 byte of space.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Dimitri Smits
to Florian Klaempfl: This should not create any additional data.
----- "Florian Klaempfl" wrote 21 lines
Am 13.09.2010 13:47, schrieb Martin Schreiber: > On Monday, 13. September 2010 13.24:18 Florian Klaempfl wrote: >> Am 13.09.2010 11:15, schrieb Martin Schreiber: >>> Delphi 7 FPC >>> Exe size: 3131392 3689304 >>> Code: 2128524 2138240 >>> Data: 752085 1541256 >> >> Do you use a lot of resource strings? > > I can not use resource strings because FPC resource strings are not unicode > capable AFAIK. > In MSEgui there are many local classdefs in the form of > " > type > ttheclass1 = class(ttheclass); > " > in order to access protected class members This should not create any additional data.

not even rtti-related and vmt-surrounding-data?

kind regards,
Dimitri Smits

Reply by email

Florian Klaempfl
to Dimitri Smits
Dimitri Smits wrote 26 lines
----- "Florian Klaempfl" schreef: > Am 13.09.2010 13:47, schrieb Martin Schreiber: >> On Monday, 13. September 2010 13.24:18 Florian Klaempfl wrote: >>> Am 13.09.2010 11:15, schrieb Martin Schreiber: >>>> Delphi 7 FPC >>>> Exe size: 3131392 3689304 >>>> Code: 2128524 2138240 >>>> Data: 752085 1541256 >>> >>> Do you use a lot of resource strings? >> >> I can not use resource strings because FPC resource strings are not > unicode >> capable AFAIK. >> In MSEgui there are many local classdefs in the form of >> " >> type >> ttheclass1 = class(ttheclass); >> " >> in order to access protected class members > > This should not create any additional data. not even rtti-related and vmt-surrounding-data?

Should be smartlinked aways if the class is not used.

Reply by email

Martin Schreiber
to Florian Klaempfl
Florian Klaempfl wrote 12 lines
>>> In MSEgui there are many local classdefs in the form of >>> " >>> type >>> ttheclass1 = class(ttheclass); >>> " >>> in order to access protected class members >> >> This should not create any additional data. > > not even rtti-related and vmt-surrounding-data? Should be smartlinked aways if the class is not used.

The classes are used for example by
"
with ttheclass1(theclassinstance) do begin
end;
"

Florian Klaempfl wrote 33 lines
Am 13.09.2010 17:10, schrieb Dimitri Smits: > > ----- "Florian Klaempfl" schreef: > >> Am 13.09.2010 13:47, schrieb Martin Schreiber: >>> On Monday, 13. September 2010 13.24:18 Florian Klaempfl wrote: >>>> Am 13.09.2010 11:15, schrieb Martin Schreiber: >>>>> Delphi 7 FPC >>>>> Exe size: 3131392 3689304 >>>>> Code: 2128524 2138240 >>>>> Data: 752085 1541256 >>>> >>>> Do you use a lot of resource strings? >>> >>> I can not use resource strings because FPC resource strings are not >> unicode >>> capable AFAIK. >>> In MSEgui there are many local classdefs in the form of >>> " >>> type >>> ttheclass1 = class(ttheclass); >>> " >>> in order to access protected class members >> >> This should not create any additional data. > > not even rtti-related and vmt-surrounding-data? Should be smartlinked aways if the class is not used. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jonas Maebe
to Martin Schreiber
Martin Schreiber wrote 5 lines
The classes are used for example by " with ttheclass1(theclassinstance) do begin end; "

Using a class means sending a class message to it, or using the class type as a first class entity in the program (e.g. "x is classtype"). A typecast can be handled completely at compile time (unless you compile with -CR, in which case above will be translated into "with (theclassinstance as ttheclass1) do begin" and hence the class type will becomes a first class entity; but you cannot do that anyway when using "class crackers" since the as-operation would throw an error).

Jonas

Reply by email