On 05/15/2017 03:27 PM, Graeme Geldenhuys wrote:
On 2017-05-15 22:50, nore...@z505.com wrote:
Graeme will need to clarify whether he was trying to be harsh on FPC
entirely, or just specifically in some areas.. :-)
I'll try and clarify... I believe FPC generates slow (or slower than
Delphi, GCC and Java) code no matter what. The saving grace is that you
don't really notice it on normal event-based desktop applications.
Writing a game is a whole different story. Games are way more sensitive
to performance.
Now the game I wrote, was a desktop GUI application. It was slow under
Linux, FreeBSD and Windows. So the results were consistent, no matter
what GUI API was used.... Be that fpGUI (via GDI), fpGUI (via X11) or
LCL-GTK2. In all cases, game rendering was to a memory image, then once
done, that memory image was bitblit to the Window Canvas.
The Java and GCC versions did the same, but were faster.
That's all I can say about. Make your own assumptions - read into it any
conspiracy theories or what-not. ;-) At this point I don't really care,
as I already moved on with that project, using OpenGL instead (both for
Java and Object Pascal).
I think the key word in Graeme's complaint is "game". And I'm willing to
bet that most of his envisioned gaming scenarios deal with a lot of
floating point math and the more advanced math functions. A quick glance
over his example code and I'm willing to bet that the "math" unit providing
the sqrt(), cos(), sin() and others is the bottle neck. But that's just a
knee-jerk reaction. Seems to me I read a while back that a ton of effort
had not gone into them.
There are only two software projects in the world that continue to impress
me with each new release: the Linux Kernel and FPC, which amuses me since I
remember the first version of FPC I saw. '99 I think it was. I laughed and
moved on. I wish I had the time provide some concrete info on where
Graeme's problem is because I'd really like to see FPC shine here too. But
it will probably be a while before I can give it proper treatment.
--
Sent from my Debian Linux laptop
Jon Foster
JF Possibilities, Inc.
j...@jfpossibilities.com
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal