4 ms·
I would assume (but haven't tested) that if you have a small class with a lot of instances, that you could make it even more efficient by doing the "Array of St
by im3w1l 6y ago
I would assume (but haven't tested) that if you have a small class with a lot of instances, that you could make it even more efficient by doing the "Array of Structures" to "Structure of Arrays" transformation[0]. Since with a structure of arrays, you could use numpy, and not have object overhead for every integer or float or bool or whatever it is you are storing.
https://en.wikipedia.org/wiki/AoS_and_SoA https://en.wikipedia.org/wiki/AoS_and_SoA