Recent

Author Topic: EXEcutable sizes  (Read 22421 times)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: EXEcutable sizes
« Reply #15 on: July 04, 2014, 06:50:28 am »
A similar post appeared on the freebasic forums btw.
huh... a targetted trolling?... hmm... where's my moderate link.

2 marcov: what are you doing on freebasic forum?  :)

the guy with the same "1337" nickname is spotted here:  http://www.reckonsteam.com/viewtopic.php?t=983
signs as "Steve"
« Last Edit: July 04, 2014, 07:00:51 am by skalogryz »

6ar453v3n

  • New member
  • *
  • Posts: 8
Re: EXEcutable sizes
« Reply #16 on: July 04, 2014, 09:16:51 am »

The size of "hello world" is the first thing I ask.
It tells me mostly if a compiler linker links in more
modules than it needs or on the other side if it
eliminates dead code after it is done.'
'
Size is very important. I have a complete DOS
8.00 system plus about 60 what I call OS utilities
and it all fits on a floppy with about 30 large apps
on a usb stick which a.bat brings into a ramdisk.

It can all fit on a 32meg hard disk partition.
This is my maintenance system.'
'
I also have two LINUX distros that each fit on a
floppy.

I have the 5 TEE programs on a USB stick, bot only
one is copied to the floppy.

I use UPX and APACK and another extensively. APACK
is usually the best but not always. This is why I can
get so much on a floppy.

A 2TB hard disk occupying 0.000005% vs 1.44 MB floppy
90% full.

Compilers and linkers that only bring in the modules that
are needed have been around at least 1973 when I started
working on mainframes. I think I can still look up some IBM
part numbers if anyone is interested.

And such systems are available today. Full functionality
with a good external LIB. Just not FP or FB either.

And "hello world" is trivial. Let's up things to a GREP utility
for something that has useful functionality. The Borland
GREP utility is 7kb before APACK. Borland Pascal vs FP.

You guys have told me everything I wanted to know and
I will stay with my Fortran compiler.

67



6ar453v3n

  • New member
  • *
  • Posts: 8
Re: EXEcutable sizes
« Reply #17 on: July 04, 2014, 09:27:55 am »
I am Steve but this Steve on RECKONSTEAM is not me.

I have been on RECKONSTEAM but the problem here is
that neither of the two ways he provides to pay will work.

One isn't for the USA, the other is a dead link, and he
hasen't fixed it but he does report that he has not made
a sale from the USA in months.

67

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: EXEcutable sizes
« Reply #18 on: July 04, 2014, 09:34:30 am »
Quote
A 2TB hard disk occupying 0.000005% vs 1.44 MB floppy 90% full.
I'm going to out on a limb here and suggest that there are people on this forum who have NEVER seen a PC with a floppy drive installed. 
For the last few years I had a floppy drive installed I never used it.  I genuinely cannot remember the last time I used a floppy.

Are you seriously concerned about filling a floppy drive.  I think not!

Quote
And such systems are available today. Full functionality with a good external LIB.
What?  That makes no sense.  That external lib is going to be full of functionality you never use.  No effective difference in file size consumed between distributing an external lib and having the routines compiled into your own app.  Think of all those poor 1's and 0's you're wasting distributing a full library. :'(
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: EXEcutable sizes
« Reply #19 on: July 04, 2014, 09:50:23 am »

The size of "hello world" is the first thing I ask.
It tells me mostly if a compiler linker links in more
modules than it needs or on the other side if it
eliminates dead code after it is done.'

The trouble is that no modern system tunes for those magnitudes anymore. Embedded systems go lower, but usually tune OSless, fsless etc.
The most logical solution would be to limit your choice to compilers of  the same era as your system dimensions or customize the RTL to your wishes.
Quote
Size is very important. I have a complete DOS
8.00 system plus about 60 what I call OS utilities
and it all fits on a floppy with about 30 large apps
on a usb stick which a.bat brings into a ramdisk.

Buy a larger USB stick :_)

Quote
I use UPX and APACK and another extensively. APACK
is usually the best but not always. This is why I can
get so much on a floppy.

Strange. Since you deploy to ramdisk anyway, I would guess that properly stripping and then archiving with something that supports solid archives would do better. The advantages of solid archives + the decompression code only once.

Another trick is to find a shell that integrates many commands. (I used 4dos in the previous century. 4dos.com was bigger but had many internal commands and many externals could be replaced by scripts, a netto plus)

Quote
Compilers and linkers that only bring in the modules that
are needed have been around at least 1973 when I started
working on mainframes. I think I can still look up some IBM
part numbers if anyone is interested.

Most compilers can. But RTLs are not always architected in a way that you can leave out everything.  It is like that when you do printf("A") that routine is bigger than the code to display one char. The compiler is not able to reduce that with dead code optimization.

Quote
And such systems are available today. Full functionality
with a good external LIB. Just not FP or FB either.

Old minimalistic systems maybe. Most modern system use some libc somewhere and that greatly inflates (as dkl told you in the FB forum). FPC is an exception there.

Quote
And "hello world" is trivial. Let's up things to a GREP utility
for something that has useful functionality. The Borland
GREP utility is 7kb before APACK. Borland Pascal vs FP.

BP is 16-bit, 16-bit code is always tighter than 32-bit and of course there is the extender binary on top of that. TP also supported no exceptions, internationalization, translation, descriptive errormessages etc etc. All that is supported by the FPC RTL, also in the very core of it.
« Last Edit: July 04, 2014, 10:21:33 am by marcov »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: EXEcutable sizes
« Reply #20 on: July 04, 2014, 10:26:56 am »
2 marcov: what are you doing on freebasic forum?  :)

I originally went there for some discussions about project course. Native backend vs external etc. And somehow stuck, mostly for the project direct discussions and to see how having a C backend works out in practice.

My first question was "why is the FB RTL in C and not (Free)Basic?"

The atmosphere is really like the early FPC 1.0.x era maillists, except that FB seems to be more game than businessapp oriented.

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: EXEcutable sizes
« Reply #21 on: July 04, 2014, 10:37:37 am »
@ 6ar453v3n

I don't understand why you posted this on FreeBasic forum:
Quote
by 6ar453v3n » Jul 04, 2014 7:40
Both are me. I asked the same question of both compilers. The answers were:

FB = 93kb
FP = 175kb

TP55 = 5kb for comparison.

The post on FP forum has deteriorated greatly.

67

In my post, I clearly stated that it was debug info and binary compiled with -XXs had 25 kB only.

EDIT:
To be clear
-Xs Strip all symbols from executable
while
-XX is smartlinking which does not affect file-size of simple "Hello World!" demo.
« Last Edit: July 04, 2014, 10:43:59 am by Blaazen »
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: EXEcutable sizes
« Reply #22 on: July 04, 2014, 10:50:57 am »
Using last fall's 16-bit snapshot (tiny memory model:)

D:\pp16>file hw.com
hw.com: DOS executable (COM)

D:\pp16>dir hw.com
07/04/2014  10:49            16,528 hw.com

tk

  • Sr. Member
  • ****
  • Posts: 361
Re: EXEcutable sizes
« Reply #23 on: July 04, 2014, 10:52:45 am »
Interesting discussion, have not the issue 56k to 5k but win exe 3.3MiB to linux exe 7.8MiB. It is the same application :)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: EXEcutable sizes
« Reply #24 on: July 04, 2014, 10:56:07 am »
Interesting discussion, have not the issue 56k to 5k but win exe 3.3MiB to linux exe 7.8MiB. It is the same application :)

The clue with that is the origin of your FPC and lazarus, finding out if they are compiled with smartlinking. (-CX)

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: EXEcutable sizes
« Reply #25 on: July 04, 2014, 11:18:12 am »
The biggest size of Lazarus-apps is on 64-bit LCL-Qt4. It's 2.5 MB with empty form (stripped).
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: EXEcutable sizes
« Reply #26 on: July 04, 2014, 12:51:50 pm »
The biggest size of Lazarus-apps is on 64-bit LCL-Qt4. It's 2.5 MB with empty form (stripped).
I also use x86_64-linux-qt, but I guess empty form is still 1.X MB.

6ar453v3n

  • New member
  • *
  • Posts: 8
Re: EXEcutable sizes
« Reply #27 on: July 04, 2014, 03:21:50 pm »
With careful selection of the software I used for my DOS system
on hard disk it all fits on a floppy as well. No extras effort. And
this is my maintenance system. Some of the apps get used quite
regulary like SPINRITE. Others only when there is a problem I
need to fix.

67
 

photor

  • New Member
  • *
  • Posts: 49
Re: EXEcutable sizes
« Reply #28 on: July 04, 2014, 04:48:52 pm »
@ 6ar453v3n

I don't understand why you posted this on FreeBasic forum:
Quote
by 6ar453v3n » Jul 04, 2014 7:40
Both are me. I asked the same question of both compilers. The answers were:

FB = 93kb
FP = 175kb

TP55 = 5kb for comparison.

The post on FP forum has deteriorated greatly.

67

In my post, I clearly stated that it was debug info and binary compiled with -XXs had 25 kB only.

EDIT:
To be clear
-Xs Strip all symbols from executable
while
-XX is smartlinking which does not affect file-size of simple "Hello World!" demo.
Let me try.

BeniBela

  • Hero Member
  • *****
  • Posts: 905
    • homepage
Re: EXEcutable sizes
« Reply #29 on: July 04, 2014, 05:52:21 pm »
BP is 16-bit, 16-bit code is always tighter than 32-bit and of course there is the extender binary on top of that. TP also supported no exceptions, internationalization, translation, descriptive errormessages etc etc. All that is supported by the FPC RTL, also in the very core of it.

That is no excuse

Using last fall's 16-bit snapshot (tiny memory model:)

D:\pp16>file hw.com
hw.com: DOS executable (COM)

D:\pp16>dir hw.com
07/04/2014  10:49            16,528 hw.com



Code: [Select]
Z:\tmp>dir Project1.exe
  7/4/2014   5:48 PM        15,872  Project1.exe

Delphi 32-bit, no special compiler settings


 

TinyPortal © 2005-2018