[fpc-other] [fpc-pascal] FPC Graphics options?
Nikolay Nikolov
nickysn at gmail.com
Tue May 23 02:45:37 CEST 2017
On 05/23/2017 01:35 AM, noreply at z505.com wrote:
> On 2017-05-18 10:12, Graeme Geldenhuys wrote:
>> On 2017-05-18 16:04, Ryan Joseph wrote:
>>> After I looked at the code I didn't see anything strange about it
>>
>> Thank you, that's what I thought too.
>>
>>> it just got me thinking, if that code can be that slow how slow is
>>> all the stuff I’m writing on a daily basis? It’s just worrying that’s
>>> all.
>>
>> +1
>> Thank goodness normal desktop applications are not that sensitive to
>> inefficient generated binaries.
>
> And this is why it is usually premature optimization.. most people are
> using FPC likely for lazarus desktop apps, not game programming or
> fast graphics rendering, so no one cared about this bug/slowness until
> someone reported it..
>
> Which is good that it was reported, to find a problem with FPC that
> was not noted before or that no one previously had any issues with.
>
> But with that pascal game development web forum out there, it should
> have come up some time previously? As there are game programmers out
> there using fpc, and there is andorra/zengl so what do they do? Work
> around the bug instead of fixing it at the source in the rtl/compiler?
> Swap in their own faster functions instead of replacing the rtl
> functions at the source level on fpc's svn server?
It was actually a case, not typical at all for game development. It was
software rendering and game engines almost always use hardware
rendering, even for 2D games. And a huge part of the performance
difference was caused by the highly specific fact that floating point to
integer conversion is slow on the x87 FPU and SSE3 improves this a lot.
If it was regular floating point, without so many integer conversions,
SSE3 wouldn't matter, and I'm guessing that SSE2 wouldn't make a lot of
difference. Disclaimer: I have not tested this. :)
And yes, Florian, Jonas and Sven did a few small optimizations, which is
a good thing, but they are nowhere near as impactful in general use
cases as people think ( which is related to the fact that the FPC
optimization performance is not as bad as this particular test was
making it out to be :) )
Nikolay
More information about the fpc-other
mailing list