vizdun blog

"Pointless pointer chasing"

Published:

A meme in the "Oppenheimer head in hand" format. The caption reads: "the 'pointless pointer chasing' wasn't all that pointless."

Explaining the meme

So you have some sort of an entity in, let's say, a game. You got multiple of these entities in fact. You got them in an array or a list of some kind. To reference them in other stuff you take their index in the thing and use it as an id. But isn't this so wasteful, couldn't you just take the pointer and use it as a reference? Oh why, yes! Of course you could! And if you did, congrats! Now you have no good way of taking IDs to them, memory managment becomes way harder, serialization becomes more complicates, oh damn, you really maybe there was a point to that pointer chasing!

This did NOT do numbers on Reddit.