Benchmarks for Free Pascal

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Benchmarks for Free Pascal

Felipe Monteiro de Carvalho
Hello,

I've recently come across some good websites about benchmarks and Free
Pascal is definitevely one of the best compilers in CPU time and
Memory Use on batteries of problems.

On Linux:

http://shootout.alioth.debian.org/

"How can we benchmark a programming language?
We can't - we benchmark programming language implementations.

How can we benchmark language implementations?
We can't - we measure particular programs."

Free Pascal vs C#:

Mono is ~15 times worse in memory use and execution speed.

http://shootout.alioth.debian.org/benchmark.php?test=all&lang=fpascal&lang2=csharp&sort=fullcpu

Free Pascal vs Java JDK: FPC wins by large =P

http://shootout.alioth.debian.org/benchmark.php?test=all&lang=fpascal&lang2=java&sort=fullcpu

Free Pascal vs C: GCC is the only compiler to beat FPC, and for a small margin.

http://shootout.alioth.debian.org/benchmark.php?test=all&lang=fpascal&lang2=gcc&sort=fullcpu

On Windows:

http://dada.perl.it/shootout/

Delphi comes even with Visual Studio c and c++ on the first place.
After, with a margin, comes gcc and free pascal. C#, Java, perl,
python, all come much after free pascal. Visual Basic is perhaps the
worse.

It is obvious that all benchmarks are flawed (as even the benchmark
website says), but it is lot's of fun ^_^

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Path, Search Path and Source Path

Adem
Hi,

I have just compiled both FPC and Lazarus from SVN
and except for one very miniscule glitch both worked
out great.

I do however one problem: When I try to compile anything
in Lazarus, I get an error saying this or the other unit
is not found.

I suspect it's all because I have not supplied the necessary
path information .

I haven't. Because I am not sure where/how I can add those
pieces of information.

Is there a GUI way of doing this; or are there files on disk
that I should update?

BTW, I am referring to Windows platform.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Path, Search Path and Source Path

Darius Blaszyk
Please switch for Lazarus specific questions to the lazarus mailinglist.

About your question, check Environment | Environment options. The tab
files contains all paths to your FPC directory.

Darius

> Hi,
>
> I have just compiled both FPC and Lazarus from SVN
> and except for one very miniscule glitch both worked
> out great.
>
> I do however one problem: When I try to compile anything
> in Lazarus, I get an error saying this or the other unit
> is not found.
>
> I suspect it's all because I have not supplied the necessary
> path information .
>
> I haven't. Because I am not sure where/how I can add those
> pieces of information.
>
> Is there a GUI way of doing this; or are there files on disk
> that I should update?
>
> BTW, I am referring to Windows platform.
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Benchmarks for Free Pascal

Florian Klämpfl
In reply to this post by Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote:
> Hello,
>
> I've recently come across some good websites about benchmarks and Free
> Pascal is definitevely one of the best compilers in CPU time and
> Memory Use on batteries of problems.

That's a known page, Ales Katona works on improving the results.

>
> On Linux:
>
> http://shootout.alioth.debian.org/
>
> "How can we benchmark a programming language?
> We can't - we benchmark programming language implementations.
>
> How can we benchmark language implementations?
> We can't - we measure particular programs."
>
> Free Pascal vs C#:
>
> Mono is ~15 times worse in memory use and execution speed.
>
> http://shootout.alioth.debian.org/benchmark.php?test=all&lang=fpascal&lang2=csharp&sort=fullcpu
>
> Free Pascal vs Java JDK: FPC wins by large =P
>
> http://shootout.alioth.debian.org/benchmark.php?test=all&lang=fpascal&lang2=java&sort=fullcpu
>
> Free Pascal vs C: GCC is the only compiler to beat FPC, and for a small margin.
>
> http://shootout.alioth.debian.org/benchmark.php?test=all&lang=fpascal&lang2=gcc&sort=fullcpu
>
> On Windows:
>
> http://dada.perl.it/shootout/

That's outdated (FPC 1.0.4).

>
> Delphi comes even with Visual Studio c and c++ on the first place.
> After, with a margin, comes gcc and free pascal. C#, Java, perl,
> python, all come much after free pascal. Visual Basic is perhaps the
> worse.
>
> It is obvious that all benchmarks are flawed (as even the benchmark
> website says), but it is lot's of fun ^_^
>
> --
> Felipe Monteiro de Carvalho
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Path, Search Path and Source Path

Adem
In reply to this post by Darius Blaszyk
[hidden email] wrote:

> Please switch for Lazarus specific questions to the lazarus mailinglist.

I'm sorry. But, I am not sure it is a Lazarus issue. Please see below.

> About your question, check Environment | Environment options. The tab
> files contains all paths to your FPC directory.

Making sure they are correct didn't help.

It turns out that Lazarus wan't in the equation in the first place.

When I added the paths (that were rported to be missing, in the fpc.cfg
the whole thing started working.

Except that, now when I compile a new project, almost everything gets
re-compiled. I know it is somethhing to do ith the paths I have added
to fpc.cfg, but I have no idea which ones I should remove.

Here's the relevant part of modified fpc.cfg. Can someone help?

# searchpath for includefiles
# release them only if you know what you do
# because this could cause a rebuild of the runtime library
# if you tell them compiler/ide to build the project (FK)
#-FiC:\FreePascal-2.1.1/source/rtl/inc;C:\FreePascal-2.1.1/source/rtl/i386
-FiC:\FreePascal-2.1.1\lazarus\lcl
-FiC:\FreePascal-2.1.1\lazarus\lcl\include
-FiC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
-FiC:\FreePascal-2.1.1\lazarus\lcl\widgetset\

# searchpath for objectfiles
#-FoC:\FreePascal-2.1.1/source/rtl/inc;C:\FreePascal-2.1.1/source/rtl/i386
-FoC:\FreePascal-2.1.1\lazarus\lcl
-FoC:\FreePascal-2.1.1\lazarus\lcl\include
-FoC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
-FoC:\FreePascal-2.1.1\lazarus\lcl\widgetset\

# searchpath for units and other system dependent things
-FuC:\FreePascal-2.1.1/units/$FPCTARGET/
-FuC:\FreePascal-2.1.1/units/$FPCTARGET/*
-FuC:\FreePascal-2.1.1/units/$FPCTARGET/rtl
-FuC:\FreePascal-2.1.1\lazarus\lcl
-FuC:\FreePascal-2.1.1\lazarus\lcl\include
-FuC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
-FuC:\FreePascal-2.1.1\lazarus\lcl\widgetset\
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Path, Search Path and Source Path

Vincent Snijders
listmember wrote:

> [hidden email] wrote:
>
>> Please switch for Lazarus specific questions to the lazarus mailinglist.
>
>
> I'm sorry. But, I am not sure it is a Lazarus issue. Please see below.
>
>> About your question, check Environment | Environment options. The tab
>> files contains all paths to your FPC directory.
>
>
> Making sure they are correct didn't help.
>
> It turns out that Lazarus wan't in the equation in the first place.
>
> When I added the paths (that were rported to be missing, in the fpc.cfg
> the whole thing started working.
>
> Except that, now when I compile a new project, almost everything gets
> re-compiled. I know it is somethhing to do ith the paths I have added
> to fpc.cfg, but I have no idea which ones I should remove.
>
> Here's the relevant part of modified fpc.cfg. Can someone help?
>
> # searchpath for includefiles
> # release them only if you know what you do
> # because this could cause a rebuild of the runtime library
> # if you tell them compiler/ide to build the project (FK)
> #-FiC:\FreePascal-2.1.1/source/rtl/inc;C:\FreePascal-2.1.1/source/rtl/i386
> -FiC:\FreePascal-2.1.1\lazarus\lcl
> -FiC:\FreePascal-2.1.1\lazarus\lcl\include
> -FiC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
> -FiC:\FreePascal-2.1.1\lazarus\lcl\widgetset\
>
> # searchpath for objectfiles
> #-FoC:\FreePascal-2.1.1/source/rtl/inc;C:\FreePascal-2.1.1/source/rtl/i386
> -FoC:\FreePascal-2.1.1\lazarus\lcl
> -FoC:\FreePascal-2.1.1\lazarus\lcl\include
> -FoC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
> -FoC:\FreePascal-2.1.1\lazarus\lcl\widgetset\
>
> # searchpath for units and other system dependent things
> -FuC:\FreePascal-2.1.1/units/$FPCTARGET/
> -FuC:\FreePascal-2.1.1/units/$FPCTARGET/*
> -FuC:\FreePascal-2.1.1/units/$FPCTARGET/rtl
> -FuC:\FreePascal-2.1.1\lazarus\lcl
> -FuC:\FreePascal-2.1.1\lazarus\lcl\include
> -FuC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
> -FuC:\FreePascal-2.1.1\lazarus\lcl\widgetset\

Don't include source paths in fpc.cfg, but only paths to compiled units.
So remove paths that start with C:\FreePascal-2.1.1\lazarus\lcl.d

You only need to add paths to *compiled* lcl units, if you want to
compile lcl application from the command line. But even then, you can do
without, if you pass the paths on the command line.

Vincent.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Path, Search Path and Source Path

Mattias Gaertner
In reply to this post by Adem
On Mon, 05 Dec 2005 01:12:57 +0200
listmember <[hidden email]> wrote:

> [hidden email] wrote:
>
> > Please switch for Lazarus specific questions to the lazarus mailinglist.
>
> I'm sorry. But, I am not sure it is a Lazarus issue. Please see below.
>
> > About your question, check Environment | Environment options. The tab
> > files contains all paths to your FPC directory.
>
> Making sure they are correct didn't help.
>
> It turns out that Lazarus wan't in the equation in the first place.
>
> When I added the paths (that were rported to be missing, in the fpc.cfg
> the whole thing started working.
>
> Except that, now when I compile a new project, almost everything gets
> re-compiled. I know it is somethhing to do ith the paths I have added
> to fpc.cfg, but I have no idea which ones I should remove.
>
> Here's the relevant part of modified fpc.cfg. Can someone help?
>
> # searchpath for includefiles
> # release them only if you know what you do
> # because this could cause a rebuild of the runtime library
> # if you tell them compiler/ide to build the project (FK)
> #-FiC:\FreePascal-2.1.1/source/rtl/inc;C:\FreePascal-2.1.1/source/rtl/i386
> -FiC:\FreePascal-2.1.1\lazarus\lcl
> -FiC:\FreePascal-2.1.1\lazarus\lcl\include
> -FiC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
> -FiC:\FreePascal-2.1.1\lazarus\lcl\widgetset\
>
> # searchpath for objectfiles
> #-FoC:\FreePascal-2.1.1/source/rtl/inc;C:\FreePascal-2.1.1/source/rtl/i386
> -FoC:\FreePascal-2.1.1\lazarus\lcl
> -FoC:\FreePascal-2.1.1\lazarus\lcl\include
> -FoC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
> -FoC:\FreePascal-2.1.1\lazarus\lcl\widgetset\
>
> # searchpath for units and other system dependent things
> -FuC:\FreePascal-2.1.1/units/$FPCTARGET/
> -FuC:\FreePascal-2.1.1/units/$FPCTARGET/*
> -FuC:\FreePascal-2.1.1/units/$FPCTARGET/rtl
> -FuC:\FreePascal-2.1.1\lazarus\lcl
> -FuC:\FreePascal-2.1.1\lazarus\lcl\include
> -FuC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
> -FuC:\FreePascal-2.1.1\lazarus\lcl\widgetset\

Remove all lazarus paths. Keep only the three $FPCTARGET paths.
If you want to compile without the Lazarus IDE, you can add
-FuC:\FreePascal-2.1.1\lazarus\lcl\units\$FPCTARGET\
-FuC:\FreePascal-2.1.1\lazarus\lcl\units\$FPCTARGET\win32

Make also sure, to remove all already wrongly compiled lazarus .ppu and .o
files from your projects.


Mattias

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Path, Search Path and Source Path

Adem
Mattias Gaertner wrote:
> On Mon, 05 Dec 2005 01:12:57 +0200
> listmember <[hidden email]> wrote:
 >

>> Here's the relevant part of modified fpc.cfg. Can someone help?
>> # searchpath for includefiles
>> # release them only if you know what you do
>> # because this could cause a rebuild of the runtime library
>> # if you tell them compiler/ide to build the project (FK)
>> #-FiC:\FreePascal-2.1.1/source/rtl/inc;C:\FreePascal-2.1.1/source/rtl/i386
>> -FiC:\FreePascal-2.1.1\lazarus\lcl
>> -FiC:\FreePascal-2.1.1\lazarus\lcl\include
>> -FiC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
>> -FiC:\FreePascal-2.1.1\lazarus\lcl\widgetset\
>>
>> # searchpath for objectfiles
>> #-FoC:\FreePascal-2.1.1/source/rtl/inc;C:\FreePascal-2.1.1/source/rtl/i386
>> -FoC:\FreePascal-2.1.1\lazarus\lcl
>> -FoC:\FreePascal-2.1.1\lazarus\lcl\include
>> -FoC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
>> -FoC:\FreePascal-2.1.1\lazarus\lcl\widgetset\
>>
>> # searchpath for units and other system dependent things
>> -FuC:\FreePascal-2.1.1/units/$FPCTARGET/
>> -FuC:\FreePascal-2.1.1/units/$FPCTARGET/*
>> -FuC:\FreePascal-2.1.1/units/$FPCTARGET/rtl
>> -FuC:\FreePascal-2.1.1\lazarus\lcl
>> -FuC:\FreePascal-2.1.1\lazarus\lcl\include
>> -FuC:\FreePascal-2.1.1/lazarus/lcl/interfaces/win32
>> -FuC:\FreePascal-2.1.1\lazarus\lcl\widgetset\
>
> Remove all lazarus paths. Keep only the three $FPCTARGET paths.

That is how it was originally.

But, then, when I tried to build/compile even a blank project in Lazarus,
I was getting 'Unable to find Interfaces' or something to that effect.

The thing is, I haven't been able to find a suitable place in Lazarus
to add the source and search paths information.

That left me with the only alternative of adding this stuff into fpc.cfg

It works --to the extent that now I can compile things.

The trouble is, it compiles everthing in those paths --into my projects
working directory-- everytime I chose to 'build all'.. This is inelegant,
and very messy.

There seems to be something I am missing. Question is what and where.

> If you want to compile without the Lazarus IDE, you can add

I do want to use Lazarus.

> -FuC:\FreePascal-2.1.1\lazarus\lcl\units\$FPCTARGET\
> -FuC:\FreePascal-2.1.1\lazarus\lcl\units\$FPCTARGET\win32


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Path, Search Path and Source Path

Mattias Gaertner
On Mon, 05 Dec 2005 23:09:45 +0200
listmember <[hidden email]> wrote:

>[...]
> > Remove all lazarus paths. Keep only the three $FPCTARGET paths.
>
> That is how it was originally.

And it is for a reason.

 

> But, then, when I tried to build/compile even a blank project in Lazarus,
> I was getting 'Unable to find Interfaces' or something to that effect.
>
> The thing is, I haven't been able to find a suitable place in Lazarus
> to add the source and search paths information.
>
> That left me with the only alternative of adding this stuff into fpc.cfg
>
> It works --to the extent that now I can compile things.
>
> The trouble is, it compiles everthing in those paths --into my projects
> working directory-- everytime I chose to 'build all'.. This is inelegant,
> and very messy.

That's the reason.

 
> There seems to be something I am missing. Question is what and where.

Your installed lazarus interfaces.ppu is obviously not compiled with the
installed compiler. That's why fpc wants to recompile and searches the
source. That's why you get 'unit not found'.
Either install a fitting pair of lazarus and fpc binaries
OR compile lazarus once manually.

 
> > If you want to compile without the Lazarus IDE, you can add
>
> I do want to use Lazarus.

Good.

Mattias
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Path, Search Path and Source Path

Felipe Monteiro de Carvalho
On 12/5/05, Mattias Gaertner <[hidden email]> wrote:
> > There seems to be something I am missing. Question is what and where.
>
> ....
> OR compile lazarus once manually.

Just an explanation. To build lazarus just open it and go to the menu
"Tools" --> "Build Lazarus".

You can also compile on the command line. I think the command is
simply "make clean all" (on lazarus directory of course)

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal