Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2018-05

FPC trunk compiler slower than 3.0.4

8 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ondrej Pokorny

Hello,

I observe that FPC trunk compiler is about 65-70% (factor 1.65-1.7) slower than FPC 3.0.4 compiler.

E.g. building Lazarus IDE takes on my machine:
1:00 with FPC 3.0.4
1:40 with FPC trunk

Do you observe the same? Any hints why? Is anybody worried about the speed? Is anybody working on the speed issues? The compile time increase is huge.

I seem to have the same fpc.cfg and FPC/Lazarus build options.

Ondrej

Reply by email

Martin
to Ondrej Pokorny
Ondrej Pokorny wrote 14 lines
Hello, I observe that FPC trunk compiler is about 65-70% (factor 1.65-1.7) slower than FPC 3.0.4 compiler. E.g. building Lazarus IDE takes on my machine: 1:00 with FPC 3.0.4 1:40 with FPC trunk Do you observe the same? Any hints why? Is anybody worried about the speed? Is anybody working on the speed issues? The compile time increase is huge. I seem to have the same fpc.cfg and FPC/Lazarus build options.

Building the IDE with custom opts, include -gw ...

3.0.4  60 seconds
trunk 67 seconds   3.1.1 [2018/04/16] not sure what revision trunk 73 seconds   revision 39024 (18 May 2018)

All builds were run twice, and the 2nd run taken. So OS file caching from previous builds should be similar for all of them.

Reply by email

Florian Klämpfl
to Ondrej Pokorny: I observe that FPC trunk compiler is about 65-70% (factor 1.65-1.7) slower than FPC 3.0.4…
Ondrej Pokorny wrote 9 lines
Hello, I observe that FPC trunk compiler is about 65-70% (factor 1.65-1.7) slower than FPC 3.0.4 compiler. E.g. building Lazarus IDE takes on my machine: 1:00 with FPC 3.0.4 1:40 with FPC trunk Do you observe the same? Any hints why?

New features? E.g. helpers made fpc a lot slower (or are they already in 3.0.x?) Optimizer improved and made the compiler slower etc.

Is anybody worried about the speed? Is anybody working on the speed issues?

Not really, we could only remove features ;)

The compile time increase is huge.

Reply by email

Jonas Maebe
to Florian Klämpfl
Florian Klämpfl wrote 11 lines
Am 18.05.2018 um 17:32 schrieb Ondrej Pokorny: > > I observe that FPC trunk compiler is about 65-70% (factor 1.65-1.7) slower than FPC 3.0.4 compiler. > > E.g. building Lazarus IDE takes on my machine: > 1:00 with FPC 3.0.4 > 1:40 with FPC trunk > > Do you observe the same? Any hints why? New features? E.g. helpers made fpc a lot slower (or are they already in 3.0.x?) Optimizer improved and made the compiler slower etc.

The new typed constant generator is also much slower than the old "just emit sequences of bytes" approach. On the other hand, it's much less error prone (no more alignment issues), much more portable and higher level. It's been in trunk for four years already though.

Jonas

Reply by email

J. Gareth Moreton

One could possibly refactor elements of the compiler, and the improvements to the optimizer might also help in places. I wouldn't call it a major priority though, although I will make suggestions if I spot anything.  Granted, the niche that I've crafted for myself is assembly language optimisation, which is not appropriate for cross-platform source code.

Gareth aka. Kit

On Mon 21/05/18 16:55 , Jonas Maebe sent:

Florian Klämpfl wrote
Am 18.05.2018 um 17:32 schrieb Ondrej Pokorny: > > I observe that FPC trunk compiler is about 65-70% (factor 1.65-1.7)

slower than FPC 3.0.4 compiler.

Show quoted text 7 lines
> > E.g. building Lazarus IDE takes on my machine: > 1:00 with FPC 3.0.4 > 1:40 with FPC trunk > > Do you observe the same? Any hints why? New features? E.g. helpers made fpc a lot slower (or are they already in

3.0.x?) Optimizer improved

and made the compiler slower etc.

The new typed constant generator is also much slower than the old "just emit sequences of bytes" approach. On the other hand, it's much less error prone (no more alignment issues), much more portable and higher level. It's been in trunk for four years already though.

Jonas

Reply by email

Marco van de Voort
to Florian Klämpfl: New features? E.g. helpers made fpc a lot slower (or are they already in 3.0.x?)…

In our previous episode, Florian Kl?mpfl said:

Show quoted text 6 lines
> 1:40 with FPC trunk > > Do you observe the same? Any hints why? New features? E.g. helpers made fpc a lot slower (or are they already in 3.0.x?) Optimizer improved and made the compiler slower etc.

Afaik 3.0.x only has helpers for classes (structed types in general?), and trunk also for other types.

Reply by email

Sven Barth
to Marco van de Voort: In our previous episode, Florian Kl?mpfl said: Afaik 3.0.x only has helpers for classes…

Marco van de Voort schrieb am Mo., 21. Mai 2018, 21:05:

Show quoted text 12 lines
In our previous episode, Florian Kl?mpfl said: > > 1:40 with FPC trunk > > > > Do you observe the same? Any hints why? > > New features? E.g. helpers made fpc a lot slower (or are they already in 3.0.x?) Optimizer improved > and made the compiler slower etc. Afaik 3.0.x only has helpers for classes (structed types in general?), and trunk also for other types.

Type helpers are already in 3.0.

Regards,
Sven

Reply by email