almost constant, log or n?
Develop games in your browser. Powerful, performant & highly capable.
I believe its object index with recycling.
But do all the objects in the game are continuous in memory or is there fragmentation?, and if so, how much? Which are the basic rules for dividing the data? In which scenarios we don't want to abuse "get by uid"?
The scenario where you are constantly creating new objects and instances.
Its advised not to use it unless you can deal with the timing well.
Think of it like you would a stack.
"Get by UID" is specially coded for efficiency. It essentially does a single Map lookup, which I think typically works in constant time (O(1)). So it won't slow down even if you have thousands of objects.