[fpc-pascal] making FPC more code optimized
florian at freepascal.org
Sun Apr 29 15:50:03 CEST 2012
Am 29.04.2012 15:13, schrieb Jorge Aldo G. de F. Junior:
> 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.
Indeed, but I don't think this is the way FPC programs are typically used.
> EVERY executable will have the same code again again again, i think
> libraries have been created to address exactly this issue.
> about the library hell, why we cant use lib versions ?
Because nobody is interested in doing so? Else we got already patches
for the install builders to contain .so as well. FPC can create shared
libs on unixes and with small flaws, it even works ;)
florian at ubuntu32:~$ ldd ./test
florian at ubuntu32:~$ ls -la
-rw-r--r-- 1 florian florian 2026701 2012-04-29 15:42
florian at ubuntu32:~$ ./test
Inconsistency detected by ld.so: dl-fini.c: 194: _dl_fini: Assertion `ns
!= 0 || i == nloaded' failed!
florian at ubuntu32:~$
> lets say,
> libpas.so.2.4.4 for fpc 2.4.4
> libpas.so.2.6.1 for fpc 2.6.1
> the only problem i see is the lack of a sane way to export class
> instances to/from the libraries.
For .so this is no problem, they act just like simple libs.
> 2012/4/29 Florian Klämpfl <florian at freepascal.org>:
>> Am 29.04.2012 14:23, schrieb Jorge Aldo G. de F. Junior:
>>> What would be usefull is to move the loads of code stored in
>>> sysutils/runtime into a dll/so.
>>> thats what makes C code look "smaller", theres a nice libc (and
>>> others) there that groups mostly used functions into a single
>>> instance, while in pascal every executable replicates the very same
>>> code for each instance.
>>> make sysutils/runtime etc an external loadable library and we are
>>> going to see FPC generate similar sized executables for similarly
>>> sized programs.
>> It makes them look smaller but their footprint is actually larger so
>> this is exactly what Ido doesn't want.
>> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal