[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.programming.threads

About Delphi and FreePascal

Ramine

2/13/2015 11:11:00 PM

Hello,


As you have noticed i am implementing my libraries using the
Delphi and FreePascal compilers, i must say that the Object Pascal
language that i am using is a fantastic language, cause it has
allowed me for example to code 2000 lines of "stable" code of StringTree
in one day , that's really amazing how is efficient Delphi and
FreePascal language, what is much more amazing is that Object Pascal is
so much easy that i have not even used a debugger in all my projects
that i think are stable now, i have used only some few writeln() and
that's all, so i think FreePascal and Delphi are powerful compilers,
also i have tested the new 64 bit FPC here:
ftp://ftp.freepascal.org/pub/fpc/snaps...

and i have tried to do the scimark2 benchmarks and it is giving a really
amazing performance on 64 bit compiler that was optimized more:

For Visual C++ 32 bit it gives:

Using 2.00 seconds min time per kenel.

Composite Score: 701.59
FFT Mflops: 519.89 (N=1024)
SOR Mflops: 622.40 (100 x 100)
MonteCarlo: Mflops: 101.07
Sparse matmult Mflops: 893.77 (N=1000, nz=5000)
LU Mflops: 1370.82 (M=100, N=100)


For csharp it gives:

Composite Score: 531.97 MFlops
FFT : 501.18 - (1024)
SOR : 711.62 - (100x100)
Monte Carlo : 31.85
Sparse MatMult : 553.74 - (N=1000, nz=5000)
LU : 861.49 - (100x100)


And for FreePascal 64 bit (from the trunk that was optimized)

Composite Score MFlops: 581.20
FFT Mflops: 404.46 (N=1024)
SOR Mflops: 717.01 (100 x 100)
MonteCarlo: Mflops: 113.12
Sparse matmult Mflops: 810.49 (N=1000, nz=5000)
LU Mflops: 860.90 (M=100, N=100)


So all in all that's a good news for FreePascal and Delphi...



Thank you,
Amine Moulay Ramdane,








3 Answers

Bonita Montero

2/13/2015 9:03:00 PM

0

Ramine wrote:

> For Visual C++ 32 bit it gives:
^^

> And for FreePascal 64 bit (from the trunk that was optimized)
^^

Comparing 32 and 64 bit code ist comparing apples and pears.
64 bit code has more registers and therefore is faster.
I'll bet 64 bit C++ code optimized the same way like pascal
-code will outperform the pascal-code because of the better
C++-compilers.
And just ignoring, that C++ is the smarter language.

Melzzzzz

2/13/2015 9:26:00 PM

0

On Fri, 13 Feb 2015 22:02:38 +0100
Bonita Montero <Bonita.Montero@gmail.com> wrote:

> Ramine wrote:
>
> > For Visual C++ 32 bit it gives:
> ^^
>
> > And for FreePascal 64 bit (from the trunk that was optimized)
> ^^
>
> Comparing 32 and 64 bit code ist comparing apples and pears.
> 64 bit code has more registers and therefore is faster.
> I'll bet 64 bit C++ code optimized the same way like pascal
> -code will outperform the pascal-code because of the better
> C++-compilers.
> And just ignoring, that C++ is the smarter language.

For reference:

[bmaxa@maxa-pc sci]$ java jnt.scimark2.commandline

SciMark 2.0a

Composite Score: 2266.6183001230893
FFT (1024): 1389.279726779432
SOR (100x100): 1653.3291557147395
Monte Carlo : 877.5985388498531
Sparse matmult (N=1000, nz=5000): 1828.6989227937966
LU (100x100): 5584.185156477624

java.vendor: Oracle Corporation
java.version: 1.7.0_76
os.arch: amd64
os.name: Linux
os.version: 3.18.6-1-MANJARO

[bmaxa@maxa-pc sci]$ gcc -Wall -O3 -march=native *.c -o scimark2 -lm
[bmaxa@maxa-pc sci]$ ./scimark2
** **
** SciMark2 Numeric Benchmark, see http://math.nist.g... **
** for details. (Results can be submitted to pozo@nist.gov) **
** **
Using 2.00 seconds min time per kenel.
Composite Score: 2813.76
FFT Mflops: 2292.31 (N=1024)
SOR Mflops: 2446.00 (100 x 100)
MonteCarlo: Mflops: 658.08
Sparse matmult Mflops: 3028.21 (N=1000, nz=5000)
LU Mflops: 5644.21 (M=100, N=100)
[bmaxa@maxa-pc sci]$ clang -Wall -O3 -march=native *.c -o scimark2 -lm
[bmaxa@maxa-pc sci]$ ./scimark2
** **
** SciMark2 Numeric Benchmark, see http://math.nist.g... **
** for details. (Results can be submitted to pozo@nist.gov) **
** **
Using 2.00 seconds min time per kenel.
Composite Score: 2743.54
FFT Mflops: 1640.43 (N=1024)
SOR Mflops: 1875.82 (100 x 100)
MonteCarlo: Mflops: 629.14
Sparse matmult Mflops: 2904.31 (N=1000, nz=5000)
LU Mflops: 6668.00 (M=100, N=100)
[bmaxa@maxa-pc sci]$


Ramine

2/14/2015 12:24:00 AM

0


Hello,


I have compiled the scimark2 benchmark with a newer gcc mingw64 64 bit
and with -O2 optimization and it has given a composite score of:

Composite Score: 760.43

The composite score of FreePascal 64 bit (the optimized version from the
trunk) is:

Composite Score MFlops: 581.20


So FreePascal is slower than gcc mingw64 by only 24%, that's a great
news for FreePascal.



Thank you,
Amine Moulay Ramdane.