Настроение: | accomplished |
Finally this crap got optimized out
Before fluid and gas code was going through every cell, which was a major CPU cycles eater.
Now I just do the set lookup.
Alternately I could have introduced an array of active water cells.
Or a hashtable.
But that would have been a partial incomplete ECS implementation.
Now the bottleneck is in the FFI library I'm using to call C functions.
It does really inefficient stuff to dynamically generate function calls.
Open source code is free, but rarely of good quality.