Interesting thoughts there arithma, but my question wasn't really about whether design patterns improve performance or not, but rather
how do I know what objects/constructs/operations have a bad influence on performance. I do understand that most (if not all) design patterns aim to solve common problems as well as making the code cleaner and more maintainable. I shouldn't have said "many of those" but some do improve performance like Flyweight for example.
Anyway, putting design patterns aside, I repeat:
In general, what objects are expensive to instantiate? What operations are known to be resource intensive? How do you measure performance and how do you know how much resources(?) an object is using?
*What is a resource in this case? Is it memory space, CPU cycles, anything else?
arithma wroteIf those online instructors make you feel it's easy to know whether something is expensive or not, it's not really that easy. I believe most of them had been native developers, and there they are concerned a lot with performance since you can easily deteriorate or improve on a program's efficiency by focusing on some language constructs. They're especially a concern when dealing with class libraries as well. But when they tell you boxing and unboxing is expensive, just imagine the indirection necessary and the memory overhead and you shouldn't be missing out on anything.
Care to elaborate?