Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

FREE Basic & Pascal (Developers)

posted by marcov(R), 05.07.2014, 14:02

> Now what happens if we just for fun include another unit (in our example
> CLASSES).
> (uses classes; begin writeln('Hello world!');end.)

> FPC 1.0.10 (smart,...): 97792 bytes
> FPC 2.6.4 (smart,...): 216064 bytes

Make sense, 2.x series has much more delphi features.

> 1) The size of FPC binary is caused by automaticaly included set of basic
> units (unit System, ev. also ObjPas). Between FPC 1.0.10 and FPC 2.6.4 came
> many new features, procedures and functions into these units so the their
> size remarkably increased.
> ->If the size is critical, use FPC 1.0.10

I would use the 16-bit compiler. It is new and generates smaller binaries afaik. fpctris is 50k. Speaking of which, seems that large memmodel is now also largely done,

> FPC 1.0.10 static: 222152 (L2) or 229816 (L0)
> smart: 189440
>
> FPC 2.6.4 static 317952 (L2) or 318976 (L0)
> smart: 105984 (!!!)
>
> The superiority of 2.6.4 smartlinking if suprising in light of previous
> tests.
> Perhaps has 2.6.4 better dead code removal algorithm.

I've no real explanation for this (specially the magnitude of the differences)

Afaik some of the tables of the main program were optimized to be more smartlinkable (tables with unit initialization, resourcestrings etc). Maybe it has some knock-on effect in your case.

Of course the entire codegenerator was rewritten, so it could be that differences slipped in (e.g. minor mods that creates a finer division in sections in certain cases). Maybe the division into sections was altered during the 2.x cg rewrite, but that wouldn't be announced as feature.

Last but not least, I assume LD got an update somewhere along the way. It might be worth testing with 2.7.x too, since IIRC 2.7.x has an internal linker for go32v2.

 

Complete thread:

Back to the forum
Board view  Mix view
15108 Postings in 1358 Threads, 245 registered users, 17 users online (0 registered, 17 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum