I was reading up on design patterns, to better my understandings of ones I know and reveal ones I didn't. One of the last ones I looks at was the Flyweight Pattern. It preaches about shared common function, and I understand this. Keeping with the game example (in the link), sharing functions for units in an RTS I'm sure would save on memory. But would this not sacrifice a great deal of [speed] performance?
Keeping with the RTS theme, suppose you have 300 units on the field, all sharing the same run function, would this not be an asynchronous nightmare? And if one was do perform this in-line (via maybe a step/render style engine), would this not bog the the CPU?