Re: BDS2006 exe sizes



On 2006-02-23, Dodgy <Dodgy@xxxxxxxxxxxxxxxxxxxxx> wrote:
On Thu, 23 Feb 2006 18:03:16 +1300, Nicholas Sherlock
<N.sherlock@xxxxxxxxx> waffled on about something:

Ian wrote:
[...]
If the compiler produces a large executable from
such a simple program as those, then they aren't efficient enough in my
book.

Even if the compiler produces executables which are far smaller than the
competition for real projects? Your benchmark is meaningless. If you
want to work with no support for a "Hello World" .exe, then don't use
the VCL or RTL. Code it all from scratch. If you want to get some work
done, stop worrying about your .exe size.

I recently had a play with the Free Pascal Compiler and Lazarus, and
was quite impressed so I decided to throw the source of my Suduko
solving program at it to see just how good/bad it was.

First the code compiled first go, no changes required, but the exe was
huge 6meg compared to 400K in D7.

Since the FPC one is with Full debugging-info-in-binary, I assume you configured
delphi to do the same? Specially don't forget to tick "td32 debug info" in
linker options :-)

. So then I decided to do some speed
tests, it might produce huge code (which I could probably trim down
myself with a bit of hand optimising) but blimee does it run fast.
Running my program and solving a 4x4 hex suduko was 3x faster with the
FPC code than D7.

Wait till you get 2.1.1. It's performance should be better :_)

FYI my suduko program uses some huge tlists and self calling
functions, so it looks like FPC is faster with it's tlist handling,
although I haven't checked to see if it's greedier with the memory
when running.

Note that FPC packs a tlist without notifiers (tfplist, but a better name
would be TD3List). If you are really speed bound by tlist, a little

Type
{$ifdef FPC}
TMylist = TFpList;
{$else}
TMyList = TList;
{$endif}

could be worthwhile.

.



Relevant Pages

  • Re: Will Delphi will do this one day?
    ... > to think about compiler optimization. ... these guys have done what Borland should have done years ... are always arrranged for profit maximization, ... > functionality than FPC offers. ...
    (borland.public.delphi.non-technical)
  • An exercise for the brain
    ... tracked far more information than those old games, ... To control all of this insanity is an independent class Universe, ... The FPC compiler is pretty damn fast. ...
    (comp.lang.pascal.misc)
  • Re: kilyx
    ... Object Pascal compiler on the market ... The FPC solution is a quick win, ... It is not something foreign to CodeGear either. ... It costs too much to compete with the power of the Open Source world, where hundreds to thousands of developers around the world, are contributing to products and solutions. ...
    (borland.public.delphi.non-technical)
  • Re: CrossKylix discontinued
    ... on making the VCL multi-platform then working on a compiler as well. ... Whether they build the compiler themselves or use the FPC ... It will at the very least be relegated to the hobbiest market. ... pillars that leveraged off each other, Borland and the Community ...
    (borland.public.delphi.non-technical)
  • Re: Delphi to bytecode compiler
    ... since win32api or pointers are involved. ... > since every Pascal compiler adds its own extension to the Pascal language. ... FPC is meant as a production compiler project. ...
    (comp.lang.pascal.delphi.misc)