I have a music system that supports loops, so for that system, I need double precision - float just doesn’t cut it. That system also mostly lives in the MonoBehaviour-world (because it’s comparatively trivial in terms of number of objects and complexity of calculations).
This system interacts with a DOTS world that needs time as well as loop points. For the DOTS world, float precision is just fine, that’s precise enough because it’s just visuals and we don’t ever go beyond 144 FPS.
So the question: double being less efficient, and comparing floats and doubles probably being even worse in terms of performance, would you recommend:
a) having different datastructures for time-related properties between DOTS and MonoBehaviour, with the conversion only happening going from MonoBehaviour to DOTS, once per frame? With just a handful of variables that this is relevant for, I’m even considering keeping both (double + float, with a XPrecise naming convention).
b) not over-optimize and just use double because comparing double and float isn’t that bad, even when dealing with tens of thousands of comparisons per frame?