Re: [fpc-pascal] Assign() vs AssignTo()

2016-02-13 Thread stdreamer
On 11/02/2016 17:13 μμ, Graeme Geldenhuys wrote: Hi, In TPersistent, we have two virtual methods. Assign() which calls AssignTo(). 1) Why are they both virtual? It seems like Assign() is what I call a template method, farming its work out to other helper methods - in this case, AssignTo(). Norm

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread wkitty42
On 02/13/2016 04:21 PM, Vojtěch Čihák wrote: I can confirm, Inc(); is slower. Change decreased time from 440 to 390 ms. my 10 run averages seems to all be right in the same neighborhood... maybe my machine has a lot more going on in the background which is affecting my simplistic testing? A

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread Vojtěch Čihák
I can confirm, Inc(); is slower. Change decreased time from 440 to 390 ms.   Quick test (empty project in Laz.): unit1.pas:35                              inc(TicketsCount); 0046DB18 4883c001                 add    $0x1,%rax unit1.pas:36                              TicketsCount+=1; 00

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread Paulo Costa
On 13-Feb-16 10:44, Serguei TARASSOV wrote: Could anyone make the series on Windows with FPC, Delphi and MS .Net? The test of FPC 3.0 and any other comments are welcome. On my PC with Windows 8.1, fpc 2.6.4 32bits, when I changed the line: inc(TicketsCount); to: TicketsCount := TicketsCount + 1

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread Vojtěch Čihák
Thanks, but assembler links are wrong, all seem to point to test.c.   V. aka Blaazen   __ Od: leledumbo Komu: Datum: 13.02.2016 18:43 Předmět: Re: [fpc-pascal] Happy tickets benchmark Here's a test from my machine (Manjaro Linux x86_

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread leledumbo
Damn, nabble doesn't like the double file extension :( Reuploaded: FPC: test.pas_s GCC: test.gcc_s Clang: test.clang_s

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread leledumbo
Here's a test from my machine (Manjaro Linux x86_64 KDE desktop kernel 4.4.1 Core i5-4200u): $ fpc -CX -XXs -O3 test.pas Hint: End of reading config file /etc/fpc.cfg Target OS: Linux for x86-64 Compiling test.pas Linking test /usr/bin/ld: warning: link.res contains output sections;

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread leledumbo
> Stripped binary size: > MSElang5.5KB > FPC 3.0 21.6KB > gcc 4.8.1 5.5KB -static flag must be missing for C(-backend) :p -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Happy-tickets-benchmark-tp5724109p5724115.html Sent from the Free Pascal - Gener

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread Michael Van Canneyt
On Sat, 13 Feb 2016, Martin Schreiber wrote: time ./testgcc.bin Found 4816030 tickets. real0m1.649s user0m1.645s sys 0m0.002s " Stripped binary size: MSElang5.5KB FPC 3.0 21.6KB gcc 4.8.1 5.5KB Linux x86, AMD Athlon 4000+ 1GHz No surprises there, you are comparing FPC wit

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread Martin Schreiber
On Saturday 13 February 2016 11:44:27 Serguei TARASSOV wrote: > Hello, > > Here is my little brute-force test for FPC, C and C# compilers. > http://arbinada.com/main/en/node/1532 > A slightely modified testcase because MSElang has no RTL yet: " program test; var n1, n2, n3, n4, n5, n6, n7, n8

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread silvioprog
On Sat, Feb 13, 2016 at 8:36 AM, Vojtěch Čihák wrote: > Hi, > > > > 64-bit Linux, Core2Duo@2GHz, FPC3.0.0: > > > > Pascal: 440 ms > > C: 163ms > > Delphi )*: 515ms > > > > )* Delphi7, personal edition, under wine, command: wine happyd7.exe > I think that the C code has a small problem: Found t

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread Vojtěch Čihák
Hi,   64-bit Linux, Core2Duo@2GHz, FPC3.0.0:   Pascal: 440 ms C:  163ms Delphi )*: 515ms   )* Delphi7, personal edition, under wine, command: wine happyd7.exe __ Od: Serguei TARASSOV Komu: Datum: 13.02.2016 11:44 Předmět: [fpc-pascal]

Re: [fpc-pascal] Happy tickets benchmark

2016-02-13 Thread silvioprog
On Sat, Feb 13, 2016 at 7:44 AM, Serguei TARASSOV wrote: > Hello, > > Here is my little brute-force test for FPC, C and C# compilers. > http://arbinada.com/main/en/node/1532 > Thanks for share the test. The result for Core i7 2.20 GHz 6 GB Windows 7 64 bits FPC 3.0 (last week trunk): Found 4816

[fpc-pascal] Happy tickets benchmark

2016-02-13 Thread Serguei TARASSOV
Hello, Here is my little brute-force test for FPC, C and C# compilers. http://arbinada.com/main/en/node/1532 The results are not so good with FPC but I cannot use Delphi to compare on Linux. Could anyone make the series on Windows with FPC, Delphi and MS .Net? The test of FPC 3.0 and any othe