4 ms·
I'm not so sure that would have been impossible. Nothing fundamental seems to prevent the compiler+runtime from: - laying out instances of the same Component n
by mpartel 6y ago
I'm not so sure that would have been impossible. Nothing fundamental seems to prevent the compiler+runtime from:
- laying out instances of the same Component next to each other in memory
- Burst.Compiling their Update() functions
- adding backwards compatible APIs to do parallel loops etc over multiple components
Given the culture of constant rewrites Unity has displayed (and I'm sure they have lots of techdebt to make rewrites feel appealing), its seems far from certain that they explored avenues like this sufficiently.
Or maybe they felt their earlier modification of Mono, which kept them on an old version of .NET for so long, was too painful to even consider touching the runtime ever again.
- Mirioron 6y ago>Nothing fundamental seems to prevent the compiler+runtime from: - laying out instances of the same Component next to each other in memory - Burst.Compiling their Update() functions - adding backwards compatible APIs to do parallel loops etc over multiple components And if those Update functions reference other objects and do something with them? If the engine automatically realigns the order in which Update is called on objects then you can't do something like that, you'd run into weird behavior. Or do I somehow misunderstand? From what I understand, the whole point of DOTS is to get people to write code that uncouples the data from what operates on the data. Once they have that they can shuffle these calls around.
- mpartel 6y agoOf course you'd still have restrictions on the code if you want it magically optimized, just as with DOTS. But you're right to be skeptical, this is not something I've thought through that thoroughly :)
- adamnemecek 6y agoThe point of ECS is that your mental model is very close to the GPU. Some sort of rewriting process would just add additional costs to this.