Interfaces make your code more understandable and easier to change in the future, but do not affect the speed, because they exist only to tell the compiler how your code fits together.
Design pattern templates are usually solutions to common problems. If you have a problem, use one of the known solutions. Will this make your program slower? It depends on the choice between the available solutions. You need to understand the tradeoffs of each template in order to choose a choice.
But without using a design template solution, you use your own DIY home solution; when we do this, we, as a rule, will not solve the problem, either quickly (in our time and in computer time), or, as is clear, for future maintenance. This last point is that design patterns give us a new way to talk about problems and solutions. Once we understand this new dictionary, we can more easily solve more complex problems.
So do they make your program slower? No, they make it work. Faster.
Enjoy reading the pictures. They make more sense if you have a real problem to solve.
andy256
source share