On 14/02/2016 12:57, fpc-pascal-requ...@lists.freepascal.org wrote:
Date: Sun, 14 Feb 2016 12:09:42 +0100 (CET) From: Michael Van Canneyt <mich...@freepascal.org> To: FPC-Pascal users discussions <fpc-pascal@lists.freepascal.org> Subject: Re: [fpc-pascal] Happy tickets benchmark On Sun, 14 Feb 2016, Florian Klaempfl wrote:

>In this case even fpc -h would have helped:)
>
>But actually, before bothering randomly with command line options, I
>would just rewrite the inner loop. Something like
>              for n7 := 0 to 9 do
>                if n1 + n2 + n3 + n4 - n5 - n6 - n7 in [0..9] then
>                  Inc(TicketsCount);
>should be much better.
To back up Florian with numbers:

No in:
Found 4816030 tickets. Elapsed time, msec: 171

Using in:
Found 4816030 tickets. Elapsed time, msec: 23

Michael.
As I said, the goal of the test is to compare the compilers, not the programmer's intelligence.
You should remove inner loop from C and C# code to get a meaningful result.

Regards,
Serguei
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to