Sign in Join

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

Mailing lists / fpc-pascal / 2005-12

FreePascal 2.0.2 available

20 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

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

Florian Klaempfl

Hi,

FPC 2.0.2 is finally available for various platforms. 2.0.2 is mainly a bug fix release to 2.0.0 though also some little features were added.

Get FPC 2.0.2 from http://www.freepascal.org/download.html or read the whatsnew.txt here: ftp://ftp.freepascal.org/pub/fpc/dist/whatsnew.txt

Have fun.

Florian Klaempfl

Hi,

FPC 2.0.2 is finally available for various platforms. 2.0.2 is mainly a bug fix release to 2.0.0 though also some little features were added.

Get FPC 2.0.2 from http://www.freepascal.org/download.html or read the whatsnew.txt here: ftp://ftp.freepascal.org/pub/fpc/dist/whatsnew.txt

Have fun.

constantijnw
to Felipe Monteiro de Carvalho
Show quoted text 5 lines
If you are new to Free Pascal you might want to try Lazarus, the open source IDE for developing applications with Free Pascal.

Thank you, Lazarus is installed. However my problems have to do with: variants,
custom variants,
inline assembly code, and
which FPC unit maps to which Delphi unit

when porting D7 code.

I read the Lazarus documentation, googled around, but I'm still stuck. It looks like documentation is fragmented, outdated or lacking. One would expect that your web site gives an up to date overview. I read 2.02 improved on variants and documentation, but its download area can't be reached; no fun yet.
Any clues on the problems mentioned above are welcome!

Felipe Monteiro de Carvalho
to constantijnw
constantijnw wrote
Thank you, Lazarus is installed. However my problems have to do with: variants, custom variants,

Can you specify what error messages / problems you are having with variants?

which FPC unit maps to which Delphi unit

Here is a list:

http://wiki.lazarus.freepascal.org/index.php/Code_Conversion_Guide#Major_unit_differences_between_Lazarus_and_Delphi

The majority of units have the same name.

Specifically for FPC Run-time Library units you can check a list of units + documentation here:
http://www.freepascal.org/docs-html/rtl/index.html

I read the Lazarus documentation, googled around, but I'm still stuck. It looks like documentation is fragmented, outdated or lacking.

There are 3 main parts of the documentation:

* Free Pascal Compiler documentation. This is quite complete and can be accessed here: http://www.freepascal.org/docs.html

* Lazarus online documentation, for use on the IDE. About 5% complete only. Needs a lot of work.

* Lazarus Wiki. Has a good amount of basic information, but needs much improvement.

So feel free to drop questions here ^^

Felipe Monteiro de Carvalho
constantijnw
to Felipe Monteiro de Carvalho

Highly appreciate your replies!

Felipe Monteiro de Carvalho wrote

Can you specify what error messages / problems you are having with variants?

The usual D7 Variants unit stuff: Varxxx, e.g. VarArrayCreate

Show quoted text 10 lines

Mea culpa! Gave up too soon; these Windows unit mappings are important to me.

Show quoted text 8 lines
The majority of units have the same name. Specifically for FPC Run-time Library units you can check a list of units + documentation here: http://www.freepascal.org/docs-html/rtl/index.html

Unreachable...

* Free Pascal Compiler documentation. This is quite complete and can be accessed here: http://www.freepascal.org/docs.html

Unreachable...

Found ASM info in the Programmers Guide.

Micha Nelissen
to constantijnw
constantijnw wrote 8 lines
Felipe Monteiro de Carvalho wrote > Specifically for FPC Run-time Library units you can check a list of > units + documentation here: > http://www.freepascal.org/docs-html/rtl/index.html > Unreachable...

Weird, are you on wireless or anything like that ? (Do you have normal MTU settings?)

I have heard of other people not able to reach www.freepascal.org, but we've never been able to debug it. I *think* it's a configuration problem having to do with packet fragmentation, and dropping ICMP needs-fragmentation replies, but I'm unsure.

Micha

Florian Klaempfl
to constantijnw: Highly appreciate your replies! Felipe Monteiro de Carvalho wrote The usual D7 Variants…
constantijnw wrote 10 lines
Highly appreciate your replies! Felipe Monteiro de Carvalho wrote > Can you specify what error messages / problems you are having with > variants? > > > The usual D7 Variants unit stuff: Varxxx, e.g. VarArrayCreate

This is no error message/problem, VarArrayCreate plainly works.

Show quoted text 30 lines
>> which FPC unit maps to which Delphi unit >> > > > Here is a list: > > http://wiki.lazarus.freepascal.org/index.php/Code_Conversion_Guide#Major_unit_differences_between_Lazarus_and_Delphi > > > > Mea culpa! Gave up too soon; these Windows unit mappings are important to me. > The majority of units have the same name. > > Specifically for FPC Run-time Library units you can check a list of > units + documentation here: > http://www.freepascal.org/docs-html/rtl/index.html > > > Unreachable... > * Free Pascal Compiler documentation. This is quite complete and can > be accessed here: http://www.freepascal.org/docs.html > > Unreachable...

Must be an error on your side, here it works as well as pinging www.freepascal.org from remote machines.

Show quoted text 6 lines
Found ASM info in the Programmers Guide. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Felipe Monteiro de Carvalho
to Micha Nelissen: Weird, are you on wireless or anything like that ? (Do you have normal MTU settings?) I…
Micha Nelissen wrote 7 lines
Weird, are you on wireless or anything like that ? (Do you have normal MTU settings?) I have heard of other people not able to reach www.freepascal.org, but we've never been able to debug it. I *think* it's a configuration problem having to do with packet fragmentation, and dropping ICMP needs-fragmentation replies, but I'm unsure.

Since we are talking about this, I can access the pages I posted, but I have never, ever being able to access
http://community.freepascal.org:10000/

I know my Internet has issues with other pages that use a custom port, but I don´t know the exact problem.

I am behind a router by the way. I have also have being having trouble to access Mantis... but this could be on the Mantis side.

Also why does google work everywhere? ^_^

Felipe Monteiro de Carvalho
Adrian Veith
to Florian Klaempfl: FPC 2.0.2 is finally available for various platforms. 2.0.2 is mainly a bug fix release…

Congratulations,

with fpc 2.0.2 it's the first time, we were able to compile and run our dbGonzales database server (complete delphi code). In earlier versions of fpc, we always had some problems (mostly with variants), which caused runtime crashes.
First tests show that the execution speed of the server is about 10% - 30% slower than the same code compiled with delphi (win32). On the first glance, i would say, that these performance problems are in the string related routines. But this is really a minor problem, since with fpc we are now able to port to other platforms and it seems that the code quality improves with each release of fpc.

Thanks for this great compiler.

Adrian Veith.

Veith System GmbH Florian Klaempfl schrieb: > Hi, > > FPC 2.0.2 is finally available for various platforms. 2.0.2 is mainly a > bug fix release to 2.0.0 though also some little features were added. > > Get FPC 2.0.2 from http://www.freepascal.org/download.html or read the > whatsnew.txt here: ftp://ftp.freepascal.org/pub/fpc/dist/whatsnew.txt > > Have fun. > > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > >
Vincent Snijders
to Adrian Veith
Adrian Veith wrote 6 lines
Congratulations, First tests show that the execution speed of the server is about 10% - 30% slower than the same code compiled with delphi (win32). On the first glance, i would say, that these performance problems are in the string related routines.

It would be nice to have these performance issues isolated, so that the compiler developers can see, if fpc performance can be improved.

Can you make a small example, and compair that compiled with fpc and delphi?

Vincent.

Florian Klaempfl
to Adrian Veith: with fpc 2.0.2 it's the first time, we were able to compile and run our dbGonzales…
Adrian Veith wrote 12 lines
Congratulations, with fpc 2.0.2 it's the first time, we were able to compile and run our dbGonzales database server (complete delphi code). In earlier versions of fpc, we always had some problems (mostly with variants), which caused runtime crashes. First tests show that the execution speed of the server is about 10% - 30% slower than the same code compiled with delphi (win32). On the first glance, i would say, that these performance problems are in the string related routines. But this is really a minor problem, since with fpc we are now able to port to other platforms and it seems that the code quality improves with each release of fpc.

Can you do some profiling? These is probably somewhere a bottleneck we didn't recognize yet because usually fpc compiled applications are faster than delphi ones.

Show quoted text 5 lines
Thanks for this great compiler. Adrian Veith.
Peter Vreman
to Adrian Veith: with fpc 2.0.2 it's the first time, we were able to compile and run our dbGonzales…
Show quoted text 10 lines
Congratulations, with fpc 2.0.2 it's the first time, we were able to compile and run our dbGonzales database server (complete delphi code). In earlier versions of fpc, we always had some problems (mostly with variants), which caused runtime crashes. First tests show that the execution speed of the server is about 10% - 30% slower than the same code compiled with delphi (win32). On the first glance, i would say, that these performance problems are in the string related routines. But this is really a minor problem, since with fpc we

If it are ansistrings it can also be the overhead of exceptions. You can try to improve speed with {$implicitexceptions off}, but with the risk of some memory leaks.

Marco van de Voort
to Adrian Veith: with fpc 2.0.2 it's the first time, we were able to compile and run our dbGonzales…
Show quoted text 12 lines
Congratulations, with fpc 2.0.2 it's the first time, we were able to compile and run our dbGonzales database server (complete delphi code). In earlier versions of fpc, we always had some problems (mostly with variants), which caused runtime crashes. First tests show that the execution speed of the server is about 10% - 30% slower than the same code compiled with delphi (win32). On the first glance, i would say, that these performance problems are in the string related routines. But this is really a minor problem, since with fpc we are now able to port to other platforms and it seems that the code quality improves with each release of fpc.

- do you compile with optimizations, e.g. -OG2p2r ?
- a few strategically helped inline directives in tight code can do wonders. However this is not universal.
- Delphi apps are often hand-tuned to the default memory manager (iow it's deficiencies are worked around with e.g. pooling, and the strengths are left relatively unoptimized) Profiling time spent in the memory manager on both systems and e.g. on Delphi with an alternate memmgrs like FastMM can help decide if this is the issue.
- A profile comparison in both cases is interesting anyway.

Adrian Veith
to Marco van de Voort
Show quoted text 16 lines
> Congratulations, > > with fpc 2.0.2 it's the first time, we were able to compile and run our > dbGonzales database server (complete delphi code). In earlier versions > of fpc, we always had some problems (mostly with variants), which caused > runtime crashes. > First tests show that the execution speed of the server is about 10% - > 30% slower than the same code compiled with delphi (win32). On the first > glance, i would say, that these performance problems are in the string > related routines. But this is really a minor problem, since with fpc we > are now able to port to other platforms and it seems that the code > quality improves with each release of fpc. > - do you compile with optimizations, e.g. -OG2p2r ?

yes I did compile with -OG3p3r, but I did a rebuild with -OG2p2r and the results look the same.

- a few strategically helped inline directives in tight code can do wonders. However this is not universal.

I already use some inline directives for the delphi2005(6) compiler, and have them also enabled when the source compiles with fpc. but anyway, this shouldn't be source of the differences in runtime performance.

Show quoted text 5 lines
- Delphi apps are often hand-tuned to the default memory manager (iow it's deficiencies are worked around with e.g. pooling, and the strengths are left relatively unoptimized) Profiling time spent in the memory manager on both systems and e.g. on Delphi with an alternate memmgrs like FastMM can help decide if this is the issue.

right, it looks like that some of the performance issues come from the memory handler and the string routines. when i compile the delphi code without FastMM4, the delphi results are more closer to fpc, but still faster. With FastMM4 delphi leads in the string intensive benchmarks about factor 1.5 - 1.8. Has somebody already ported FastMM4 to fpc ?

- A profile comparison in both cases is interesting anyway.

I will try to nail the problem down to some example code. But at the moment the picture for me is like this:
Task: Full table scan 100 times of 25000 records
a) Comparing an integer field with a constant value: delphi 0.750 sec - fpc 0.765 - factor 1.02
b) Comparing a char field with a constant value ( = operation): delphi 3.219 sec - fpc 4.734 - factor 1.47
c) Comparing a char field with a constant value (like operation): delphi 3.453 sec - fpc 6.547 sec - factor 1.89
d) Comparing a char field with a constant value (optimized like operation): delphi 2.219 sec - fpc 3.968 sec - factor 1.78

the database dependent operations are similar for all 3 tests. the difference is in the operation which is performed 250.000 times. in a) its getting the integer value of the database field and compare it to the value (the compare is without a runtime library call) b) get the string value of the database field and compare it to the value (the compare is done with a runtime lib call to AnsiCompareStr). c) same as b) but call a function which does a like operation. this function is the same for delphi and fpc.
d) get a pointer to string in the database field and call the same like function as in c)

I will try to analyze which part of the code makes these differences.

Koenraad Lelong
to Florian Klaempfl: FPC 2.0.2 is finally available for various platforms. 2.0.2 is mainly a bug fix release…
Florian Klaempfl wrote 9 lines
Hi, FPC 2.0.2 is finally available for various platforms. 2.0.2 is mainly a bug fix release to 2.0.0 though also some little features were added. Get FPC 2.0.2 from http://www.freepascal.org/download.html or read the whatsnew.txt here: ftp://ftp.freepascal.org/pub/fpc/dist/whatsnew.txt Have fun.

I would like to have a crosscompiler for arm-linux. I downloaded fpcbuild-2.0.2 and I successfully did a 'make cycle CPU_TARGET=arm OS_TARGET=linux'. What's next ?
Would it be possible to make an rpm for it ?
Thanks,
Koenraad Lelong.

Peter Vreman
to Koenraad Lelong
Show quoted text 14 lines
Florian Klaempfl wrote: > Hi, > > FPC 2.0.2 is finally available for various platforms. 2.0.2 is mainly a > bug fix release to 2.0.0 though also some little features were added. > > Get FPC 2.0.2 from http://www.freepascal.org/download.html or read the > whatsnew.txt here: ftp://ftp.freepascal.org/pub/fpc/dist/whatsnew.txt > > Have fun. I would like to have a crosscompiler for arm-linux. I downloaded fpcbuild-2.0.2 and I successfully did a 'make cycle CPU_TARGET=arm OS_TARGET=linux'. What's next ? Would it be possible to make an rpm for it ?

Everything is possible. You can adapt the fpc.spec according to your own needs.