[fpc-pascal] making FPC more code optimized

Jonas Maebe jonas.maebe at elis.ugent.be
Sun Apr 29 15:25:56 CEST 2012

On 29 Apr 2012, at 15:13, Jorge Aldo G. de F. Junior wrote:

> If you deploy one executable, ok, but if you want to create a handfull
> of executables (following unix logic of many small programs) then you
> have a problem.

You certainly do end up with larger executables. Whether or not this is a problem depends on the situation.

> EVERY executable will have the same code again again again, i think
> libraries have been created to address exactly this issue.

That's true.

> about the library hell, why we cant use lib versions ?
> lets say,
> libpas.so.2.4.4 for fpc 2.4.4
> libpas.so.2.6.1 for fpc 2.6.1

There is a new FPC 2.6.1 every time a revision is committed to the fixes_2_6 branch. Also, these libpas.so files would be quite large (about 21MB for FPC 2.6.0). You need quite a few small unix utilities to compensate for that in terms of disk space. Of course, you will also reduce memory usage somewhat in case you run several of those utilities at the same time when using dynamic libraries (but startup will be a little slower due to the run time relocation and copy-on-write).

> the only problem i see is the lack of a sane way to export class
> instances to/from the libraries.

That's what (the as of yet unsupported) Delphi-style packages solve. They have the same versioning issue though.


More information about the fpc-pascal mailing list