Sign in Join

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

Mailing lists / lazarus / 2011-09

Pascal's Compilers.

17 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

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

Cristofer Martins

Can anyone explains me why programs generated by Pascal compilers are less fast than programs generateds by C/C++ Compilers? Is this related with Compilation time? Pascal Compilers compile programs very fast compared c/c++ compilers.

Reply by email

Frank Church
to Felipe Monteiro de Carvalho

On 25 September 2011 08:15, Felipe Monteiro de Carvalho <

Show quoted text 14 lines
wrote: This post is double posted from the forum: http://www.lazarus.freepascal.org/index.php/topic,14770.0.html Please don't double post. For everyone else: Please don't answer in the mailling list to keep discussion in 1 place. -- Felipe Monteiro de Carvalho

I wouldn't call that double posting as the mailing list and the forum are quite different places with different audiences. In the past I have learned that questions which get answers in one forum are not answered in the other.

I suppose as an advanced developer/contributor you keep an equal eye on both, but not so with other more knowledgeable users.

> _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110925/f44ddc27/attachment.html>

Reply by email

Ludo Brands
to Frank Church

On 25 September 2011 08:15, Felipe Monteiro de Carvalho wrote:

This post is double posted from the forum:
http://www.lazarus.freepascal.org/index.php/topic,14770.0.html

Please don't double post.

For everyone else: Please don't answer in the mailling list to keep discussion in 1 place.

Felipe Monteiro de Carvalho I wouldn't call that double posting as the mailing list and the forum are quite different places with different audiences. In the past I have learned that questions which get answers in one forum are not answered in the other. I suppose as an advanced developer/contributor you keep an equal eye on both, but not so with other more knowledgeable users. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110925/e2cd2cce/attachment.html>

Reply by email

Ludo Brands
to Frank Church: On 25 September 2011 08:15, Felipe Monteiro de Carvalho < I wouldn't call that double…

On 25 September 2011 08:15, Felipe Monteiro de Carvalho wrote:

This post is double posted from the forum:
http://www.lazarus.freepascal.org/index.php/topic,14770.0.html

Please don't double post.

For everyone else: Please don't answer in the mailling list to keep discussion in 1 place.

Felipe Monteiro de Carvalho I wouldn't call that double posting as the mailing list and the forum are quite different places with different audiences. In the past I have learned that questions which get answers in one forum are not answered in the other. I suppose as an advanced developer/contributor you keep an equal eye on both, but not so with other more knowledgeable users. Ooops, that was sent too quickly. Your observation about not all people being on both is correct. However, signaling that the question is asked on both would avoid wasting efforts. Ludo -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110925/e8648056/attachment-0001.html>

Reply by email

Lukasz Sokol
to Cristofer Martins: Can anyone explains me why programs generated by Pascal compilers are less fast than…
Cristofer Martins wrote 5 lines
Can anyone explains me why programs generated by Pascal compilers are less fast than programs generateds by C/C++ Compilers? Is this related with Compilation time? Pascal Compilers compile programs very fast compared c/c++ compilers.

This reminds me of an old joke of making of a Straw Man figure of speech...

/When/ will you stop beating up your wife/woman/girlfriend ? (select as appropriate)

L.

ICSMBIDWT... (I Could Stop Myself But I Didn't Want To)

Reply by email

Henry Vermaak
to Lukasz Sokol
Lukasz Sokol wrote 10 lines
On 25/09/2011 04:19, Cristofer Martins wrote: > Can anyone explains me why programs generated by Pascal compilers are > less fast than programs generateds by C/C++ Compilers? Is this > related with Compilation time? Pascal Compilers compile programs very > fast compared c/c++ compilers. > This reminds me of an old joke of making of a Straw Man figure of speech... /When/ will you stop beating up your wife/woman/girlfriend ? (select as appropriate)

This is actually a "loaded question", not a straw man. But I agree, Cristofer's question is a great example of this fallacy.

Henry

Reply by email

Frank Church
to Henry Vermaak
Henry Vermaak wrote 24 lines
On 26/09/11 10:10, Lukasz Sokol wrote: > On 25/09/2011 04:19, Cristofer Martins wrote: > >> Can anyone explains me why programs generated by Pascal compilers are >> less fast than programs generateds by C/C++ Compilers? Is this >> related with Compilation time? Pascal Compilers compile programs very >> fast compared c/c++ compilers. >> >> > This reminds me of an old joke of making of a Straw Man figure of > speech... > > /When/ will you stop beating up your wife/woman/girlfriend ? (select as > appropriate) > This is actually a "loaded question", not a straw man. But I agree, Cristofer's question is a great example of this fallacy. Henry http://shootout.alioth.debian.org/u32/pascal.php

There are always trade-offs.

In any case "*Show me the code!!*"

> ______________________________**_________________ > Lazarus mailing list > .**freepascal.org > http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus> > -- Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110926/76389597/attachment.html>

Reply by email

Paul Breneman
to Frank Church
Frank Church wrote 29 lines
On 26 September 2011 10:28, Henry Vermaak wrote: > On 26/09/11 10:10, Lukasz Sokol wrote: > >> On 25/09/2011 04:19, Cristofer Martins wrote: >> >>> Can anyone explains me why programs generated by Pascal compilers are >>> less fast than programs generateds by C/C++ Compilers? Is this >>> related with Compilation time? Pascal Compilers compile programs very >>> fast compared c/c++ compilers. >>> >>> >> This reminds me of an old joke of making of a Straw Man figure of >> speech... >> >> /When/ will you stop beating up your wife/woman/girlfriend ? (select as >> appropriate) >> > This is actually a "loaded question", not a straw man. But I agree, > Cristofer's question is a great example of this fallacy. > > Henry > > > http://shootout.alioth.debian.org/u32/pascal.php There are always trade-offs. In any case "*Show me the code!!*"

There is a *huge* difference in the "Memory KB" in most cases!

Reply by email

Frank Church
to Paul Breneman
Paul Breneman wrote 38 lines
Frank Church wrote: > On 26 September 2011 10:28, Henry Vermaak > wrote: > > On 26/09/11 10:10, Lukasz Sokol wrote: >> >> On 25/09/2011 04:19, Cristofer Martins wrote: >>> >>> Can anyone explains me why programs generated by Pascal compilers are >>>> less fast than programs generateds by C/C++ Compilers? Is this >>>> related with Compilation time? Pascal Compilers compile programs very >>>> fast compared c/c++ compilers. >>>> >>>> >>>> This reminds me of an old joke of making of a Straw Man figure of >>> speech... >>> >>> /When/ will you stop beating up your wife/woman/girlfriend ? (select as >>> appropriate) >>> >>> This is actually a "loaded question", not a straw man. But I agree, >> Cristofer's question is a great example of this fallacy. >> >> Henry >> >> >> http://shootout.alioth.debian.**org/u32/pascal.php<http://shootout.alioth.debian.org/u32/pascal.php> >> > > There are always trade-offs. > > In any case "*Show me the code!!*" > There is a *huge* difference in the "Memory KB" in most cases!

Yes that part is pretty obvious, but without seeing the program code most of these comparisons are not very meaningful.

Is c++ memory usage that bad?

Show quoted text 7 lines
-- ______________________________**_________________ Lazarus mailing list .**freepascal.org http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110927/dff49232/attachment.html>

Reply by email

Lukasz Sokol
to Frank Church
Frank Church wrote 18 lines
http://shootout.alioth.debian.__org/u32/pascal.php <http://shootout.alioth.debian.org/u32/pascal.php> There are always trade-offs. In any case "*Show me the code!!*" There is a *huge* difference in the "Memory KB" in most cases! Yes that part is pretty obvious, but without seeing the program code most of these comparisons are not very meaningful. Is c++ memory usage that bad?

I noticed the g++ code of at least the k-nucleotide test is using parallel processing! Whereas the main loop of the fpc program was mostly first- swallowing the stdin, then /reallocing/ buffers! No wonder FPC is slower here -do all languages get the same treatment on the shootout...? Or are some more even than others!

Lukasz

Reply by email

Sven Barth
to Lukasz Sokol
Lukasz Sokol wrote
do all languages get the same treatment on the shootout...? Or are some more even than others!

It seems to be the latter. This isn't a new topic though. There were already some talks on the - I believe - fpc-pascal list some months ago about improving the results. So if someone wants to see improved results there, then please improve the programs :)

Regards,
Sven

Reply by email

Lukasz Sokol
to Lukasz Sokol: I noticed the g++ code of at least the k-nucleotide test is using parallel processing!…
Lukasz Sokol wrote 28 lines
On 27/09/2011 14:18, Frank Church wrote: > > http://shootout.alioth.debian.__org/u32/pascal.php > <http://shootout.alioth.debian.org/u32/pascal.php> > > > There are always trade-offs. > > In any case "*Show me the code!!*" > > > There is a *huge* difference in the "Memory KB" in most cases! > > > Yes that part is pretty obvious, but without seeing the program code > most of these comparisons are not very meaningful. > > Is c++ memory usage that bad? > I noticed the g++ code of at least the k-nucleotide test is using parallel processing! Whereas the main loop of the fpc program was mostly first- swallowing the stdin, then /reallocing/ buffers! No wonder FPC is slower here -do all languages get the same treatment on the shootout...? Or are some more even than others! Lukasz

this shows especially when you compare single vs quad-code results on the knucleotide...

L.

Reply by email

Lukasz Sokol
to Sven Barth: It seems to be the latter. This isn't a new topic though. There were already some talks…
Sven Barth wrote 11 lines
Am 27.09.2011 16:01, schrieb Lukasz Sokol: > do all languages get the same treatment on the shootout...? Or are > some more even than others! It seems to be the latter. This isn't a new topic though. There were already some talks on the - I believe - fpc-pascal list some months ago about improving the results. So if someone wants to see improved results there, then please improve the programs :) Regards, Sven

Yeah I remember, I was one of them ;J only not much time for fun-hacking recently...

el es

Reply by email

Felipe Monteiro de Carvalho
to Felipe Monteiro de Carvalho: The shootout is a hacking competition, it is not a scientific test of which language is…
Felipe Monteiro de Carvalho wrote 5 lines
On Tue, Sep 27, 2011 at 4:01 PM, Lukasz Sokol wrote: > do all languages get the same treatment on the shootout...? Or are some more even than others! The shootout is a hacking competition, it is not a scientific test of which language is faster.

Actually I wrote that because the last time I looked at the shootout some years ago it's description was quite humorous, it clearly stated that it is completely flawed and should not be used for serious things. It even made it hard to recommend FPC by linking to the shootout because it's description made the shootout look like a joke!

Now I entered it again and it's main description clearly invites people to choose a programming language based on the shootout results and the word "flawed" is nowhere to be found.

It looks like the shootout was take over by trolls!

Felipe Monteiro de Carvalho

Reply by email

Lukasz Sokol
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote
On Tue, Sep 27, 2011 at 4:19 PM, Felipe Monteiro de Carvalho wrote:

[...]

It looks like the shootout was take over by trolls!

And they made all efforts to make it look like it's /the/ thing to measure 'compiler efficiency'... (Although they still do mention it's like comparing apples and oranges, but then 'what if your choice is between apples and oranges' ...)

But there is no rules to it - hence in most cases g++ is the one to choose...

I would try but I've got life outside IT world which will ferociously defend itself :J

L.

Reply by email