Sign in Join

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

Mailing lists / fpc-pascal / 2005-12

Benchmarks for Free Pascal

10 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

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
listmember
to Felipe Monteiro de Carvalho

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.

Unknown author
to listmember

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

Show quoted text 25 lines
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 - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Florian Klaempfl
to Felipe Monteiro de Carvalho: I've recently come across some good websites about benchmarks and Free Pascal is…
Felipe Monteiro de Carvalho wrote 5 lines
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.

Show quoted text 28 lines
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).

Show quoted text 15 lines
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 - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
listmember
to Unknown author: Please switch for Lazarus specific questions to the lazarus mailinglist. About your…
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\

Vincent Snijders
to listmember
listmember wrote 49 lines
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.

Mattias Gaertner
to listmember: I'm sorry. But, I am not sure it is a Lazarus issue. Please see below. Making sure they…
Show quoted text 47 lines
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

listmember
to Mattias Gaertner
Mattias Gaertner wrote 31 lines
On Mon, 05 Dec 2005 01:12:57 +0200 listmember 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
Mattias Gaertner
to listmember
[...] > Remove all lazarus paths. Keep only the three $FPCTARGET paths. That is how it was originally.

And it is for a reason.

Show quoted text 13 lines
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

Felipe Monteiro de Carvalho
to Mattias Gaertner
Mattias Gaertner 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