Re:Copying data is wasteful, mutating data is dangerous
by nitwit005 on Friday January 10, 2020 @12:16AM
(#22008499)
If you need the highest performance, you're probably always going to be stuck with some ugliness.
If the code is isolated to some specific logical module, like the game AI, you can bury it in a private helper method that at least hides the details from callers.
If the code is isolated to some specific logical module, like the game AI, you can bury it in a private helper method that at least hides the details from callers.