I work in Opera Software in the Mobile department so I know that Opera is extremely well optimized by dozens of great developers. The JIT can detect if the phone has FPU or not and will act accordingly.
So according to your answer it is not possible for FPC to compile in such a way, so that the executable when it starts can see if the FPU is there or not.
What about the other optimizations?
Opera Mobile itself is a native application, it is not a Java app, so you can be 100% sure that native apps can be much faster then Java or JavaScript as the speed of Opera Mobile is amazing. But they do know a trick which allows to put 2 binaries into the APK: 1 for lower end phones and another for higher end phones, but I have no idea how they do this.
What i have done was to "compile"/convert the object Pascal Code of the engine to Javascript code, which then i run in Opera Mobile. The very good speed in my opinion comes from the very good Jitter that Opera Mobile has!!!
The same Javascript code running on Firefox mobile is around 4(!) times slower that in Opera Mobile!!!!
But even so, Firefox mobile is 2 times faster that the native executable from FPC...
A good optimized native executable should be, as you already said, faster (.. or at least as fast) than any Java or Javascript code.
Buffer any stretching into a separate TBitmap and draw that in the OnPaint event.
I will give it a try.
Opera software is a large company with hundreds of developers. Lazarus for Android is mostly me coding for bounties. If other people send patches then things can get much more optimized. In particular the stretching code needs code which can optimize it for some most common pixel formats. Right now there is only the generic solution which works in any pixel format which I wrote, but if you know the pixel format and optimize for it the speed can grow dramatically. I already did this optimization for bitmap copying/drawing so this part is tens of times faster then it used to be. But my time is limited and my ToDo is huge. So optimizing stretching is not a priority item in my list.
I understand what you mean.
You are doing a good work but it is a lot of work and i can understand you.
If you can tell me where and how to start optimizing some parts of the LCL (expecially the stretching), maybe i could help a bit!
But without the use of the FPU the speed improvements can never be perfect...
Is it possible to use the GPU for the drawing part of the LCL?
Thanks for your answers
Kostas