Am 30.07.2018 um 19:55 schrieb J. Gareth Moreton:
Correct me if I'm mistaken, but I believe one shortcoming with the
Free Pascal Compiler, despite its speed, is that it isn't
multi-threaded. It can't compile multiple independent units at once,
and probably won't be able to for a while due to the use of global
variables in the node builder. When it comes to building Lazarus and
the compiler, this is gotten around by the Makefiles running several
instances of the compiler on different processes, building independent
packages that can later be linked.
I personally think that if the compiler can be made multi-threaded,
then projects like OpenSceneGraph might see a huge improvement in
compile times if the compiler is smart enough to identify units that
don't depend on each other and compile them in parallel. I'm not sure
how cross-compatible it can be made, since different platforms
approach multithreading in different ways and I've noticed that the
compiler tends to avoid using SysUtils and Classes and the like (so no
using TThread for now).
TThread is not a necessity. It's functionality and the synchronization
primitives are based on what TThreadManager provides. This manager
resides in the System unit and is accessible through functions like
BeginThread and such. Please note however that this might need an
external thread manager on certain platforms (e.g. Unix-like systems)
and the idea on those platforms is for the compiler *not* to rely on the
C-library.
Regards,
Sven
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel