-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow fps on haxe target #59
Comments
Since i cannot see your code, i need more information. Please create a test here that works slow in haxe: That way i can workon improving the performance. |
Sorry didn't notice that you were self-assigning this :) |
BTW: I make many test on different devices. First message about debug only, for release without fix speed x10 (about 40fps). We already in test find problems and increase release on 5% (debug on 100% !!). Need more time maybe we can increase on 10% release, and then i create PR because now our fix will be broke Haxe tests on jtransc. |
Cool. Let me know if I can do something about this. Also if you can tell me what do you changed or how are you using it, maybe I can come out with something to make it compatible with current JTransc or adapt JTransc for it. Also haxe debug is usually pretty slow as far as I remember. It adds a lot of boilerplate for debugging + backtraces. I added |
patch.zip |
Ok. One thing I see here is that I should optimize Haxe's System.arraycopy. This looks slow:
In C++ we have a pointer so we can convert it to a plain The other thing I see is that we have to avoid copying if possible, for converting Buffer to Lime typed arrays with things like Also we can try things like specialized direct buffers (which are required in libgdx) that end using typed arrays while allowing the rest of the application to use better types for arrays. The problem with using typed arrays here is that prevented normal arrays to be as fast as possible in Haxe target that's why I changed it ( I used the benchmark to ensure this was true ). If I cannot find a way to make your use-case faster while keeping it, I will accept using typed arrays again for arrays so you can advance with this. |
For the record. I have updated benchmark ( https://github.com/jtransc/jtransc-benchmark ) to test several arraycopy types. These are the results on my machine:
So except for int, haxe-cpp arraycopy is pretty slow, specially comparing with jtransc-pure-cpp which is blazing fast. So I will work on this as a first step for this issue. |
Update: After #189 we have good results. I will be use spine demo on windows, but all platforms have same result in percent. |
I finish tests, my code no new changes in real projects, bust spine-demo only. But this very simple project, close it. |
i create for working with this problem. For many polygons in mesh (spine) we have 2-4 fps on iPad Air2.
The text was updated successfully, but these errors were encountered: