So, I made fixes I mentioned in my last post. Plus I made everything as I could [Inline]. And this gave tremendous performance gain - up to +30%! Now I can handle 800 objects with 60 fps!
The video:
Some interesting things I learned about [Inline] in as3 (in addition to well known, such as mandatory to function be final, static, global):
The video:
Some interesting things I learned about [Inline] in as3 (in addition to well known, such as mandatory to function be final, static, global):
- you can't use super keyword inside method marked as [Inline]. That's logical - compiler just take the method's code and places it instead of function call. So in the new place there's simply no such super.
- you can't use optional parameters with method marked as [Inline]. You'll get compiler error if you'll try.
- you can't debug a code succesfully inside method marked as [Inline].
As you can see, the only memory allocations I have are done with player runtime and are unavoidable.
So from now on I'm starting to work on graphics! No more ugly cubes and spheres!
So from now on I'm starting to work on graphics! No more ugly cubes and spheres!
Комментариев нет:
Отправить комментарий