Linker speed

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Linker speed

Rainer Stratmann
I try to be independend from lazarus and wrote a configure file which I then
pass to fpc at the console.

Now suddenly the linker is noteable slower.
In both modes (from lazarus and from console).

Which reason can it have?
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linker speed

Tomas Hajny-2
On Fri, August 24, 2012 10:52, Rainer Stratmann wrote:
> I try to be independend from lazarus and wrote a configure file which I
> then
> pass to fpc at the console.
>
> Now suddenly the linker is noteable slower.
> In both modes (from lazarus and from console).
>
> Which reason can it have?

Which platform and which compiler version is it? Do you use internal or
external linker?

Tomas


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linker speed

Rainer Stratmann
Am Friday 24 August 2012 11:00:35 schrieb Tomas Hajny:

> On Fri, August 24, 2012 10:52, Rainer Stratmann wrote:
> > I try to be independend from lazarus and wrote a configure file which I
> > then
> > pass to fpc at the console.
> >
> > Now suddenly the linker is noteable slower.
> > In both modes (from lazarus and from console).
> >
> > Which reason can it have?
>
> Which platform and which compiler version is it? Do you use internal or
> external linker?

Os: Linux
Compiler Version: 2.4.2-0 i386

Sometimes there is the message:
/urs/bin/ld: warning: link.res contains output sections; did you forget -T?

Where can I see and/or configure if an internal or external linker is used?
I assume it is an external linker because of the message (/urs/bin/ld ...).
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linker speed

Graeme Geldenhuys-2
On 24 August 2012 10:11, Rainer Stratmann <[hidden email]> wrote:
> Sometimes there is the message:
> /urs/bin/ld: warning: link.res contains output sections; did you forget -T?

The latest FPC under Linux now always produces this message. Search
the message archives... I asked this question before and somebody
explained what is causing it, but basically nothing really to worry
about. Though I must admit, I don't like such message either. :)


> Where can I see and/or configure if an internal or external linker is used?
> I assume it is an external linker because of the message (/urs/bin/ld ...).

Linux doesn't have an internal linker, so it that case it is always
external. Only FPC under Windows has an internal linker as far as I
know.


--
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linker speed

Tomas Hajny-2
In reply to this post by Rainer Stratmann
On Fri, August 24, 2012 11:11, Rainer Stratmann wrote:

> Am Friday 24 August 2012 11:00:35 schrieb Tomas Hajny:
>> On Fri, August 24, 2012 10:52, Rainer Stratmann wrote:
>> > I try to be independend from lazarus and wrote a configure file which
>> I
>> > then
>> > pass to fpc at the console.
>> >
>> > Now suddenly the linker is noteable slower.
>> > In both modes (from lazarus and from console).
>> >
>> > Which reason can it have?
>>
>> Which platform and which compiler version is it? Do you use internal or
>> external linker?
>
> Os: Linux
> Compiler Version: 2.4.2-0 i386

That is a pretty old version now (not that this should be the reason of
your issue).


> Sometimes there is the message:
> /urs/bin/ld: warning: link.res contains output sections; did you forget
> -T?
>
> Where can I see and/or configure if an internal or external linker is
> used?
> I assume it is an external linker because of the message (/urs/bin/ld
> ...).

Indeed, it's external (which is your only option for the Linux target
currently). Does your fpc.cfg use smartlinking (-XX)? I could imagine that
smartlinking could slow down things if you haven't used it before (but the
advantage of smartlinking are smaller binaries obviously).

What is the current linking time and rough speed difference compared to
the previous state? Current linking time may get easier to measure if you
use option -s when compiling and adapt the resulting ppas.sh by adding
some timing call before and after the ld invocation.

Tomas


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linker speed

Rainer Stratmann
Am Friday 24 August 2012 12:02:06 schrieb Tomas Hajny:
> > Compiler Version: 2.4.2-0 i386
>
> That is a pretty old version now (not that this should be the reason of
> your issue).

It was ok with the same version :-)
I am satisfied with 2.4.2-0.

> Does your fpc.cfg use smartlinking (-XX)?

Yes.

> I could imagine that
> smartlinking could slow down things if you haven't used it before (but the
> advantage of smartlinking are smaller binaries obviously).

Yes, it was the reason, thanks!
I did not deselect external configuration file in the project settings.
So I was not aware that the switch was set there...

> What is the current linking time and rough speed difference compared to
> the previous state?

0.1ms to 0.6ms (I have an i7-3770S).

> Current linking time may get easier to measure if you
> use option -s when compiling and adapt the resulting ppas.sh by adding
> some timing call before and after the ld invocation.

Lazarus shows the time and I can feel that it is slower in comparison to
before.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal