Utilizes CPU resources better.
I tested this using artificial load inside GlowEntity.pulse() method - each pulse every entity generates 10000 random integers.
Here are my benchmarks (CPU: Ryzen 2600X):
A message is shown every 120 ticks inside each world thread.
Single threaded
ForkJoinPool
Possible concerns:
I know in the future AI for mobs will be added and right now I don't know for sure if it will affect it.
What I did is just speed up iteration inside the GlowWorld.pulse() method.
Utilizes CPU resources better. I tested this using artificial load inside GlowEntity.pulse() method - each pulse every entity generates 10000 random integers. Here are my benchmarks (CPU: Ryzen 2600X): A message is shown every 120 ticks inside each world thread.
Single threaded![single thread](https://user-images.githubusercontent.com/22118902/51560526-6548c280-1e8d-11e9-8105-e751ea2ac4c0.jpg)
ForkJoinPool![forkjoinpool](https://user-images.githubusercontent.com/22118902/51560528-6548c280-1e8d-11e9-891a-220d15853c16.jpg)
Possible concerns: I know in the future AI for mobs will be added and right now I don't know for sure if it will affect it. What I did is just speed up iteration inside the GlowWorld.pulse() method.