3 ms·
Could you expand on "how bad the performance can be" part? If you are doing graphics, it is entirely more likely that you do something dumb there - there are m
by gf000 2y ago
Could you expand on "how bad the performance can be" part?
If you are doing graphics, it is entirely more likely that you do something dumb there - there are many pitfalls.
Also, unless you are doing something very CPU-heavy, there won't be any noticeable difference as web servers are doing IO predominantly. Maybe slightly less RAM usage (but you could also just decrease the heapsize to tradeoff a bit of CPU-time for memory, if it were to make sense).
- pylua 2y agoIn my game loop I was using optional. When I profiled it the use of optional was one of the slowest points that could be optimized using null checks and ifs. There were a lot of other slow areas as well, not where you would expect it.
- gf000 2y agoSure, Optional is not the most optimal thing to use/do, though depending on how many entities you were operating with, that itself may still be negligible.
- pylua 2y agoThat’s the pain point - well written java code may not be the most performant depending on the situation. It wasn’t just optional but other areas as well.
- gf000 2y agoThat's not my experience, though game development is certainly a niche and Java may not be the top choice for that. You might sometimes have to reach for SoA-like structures and reference them via indices, at least for the core ECS, but for the rest you can easily use bog-standard Java -- not everything has to be "ultra-fast, specially written java", just certain hot loops.
- pylua 2y agoRight. I didn’t started digging into it until I realized the application was clearly sluggish in certain scenarios. As I am doing this for fun I am going to see what kind of speed up I get in rust for this.