Designing for Performance

Gak sempat lihat chat ttg CLR Performance Tips, tapi dapet sebagian transkripnya. One of the interesting questions:

“Rico Mariani (Expert):
Q: When refactoring code - are there performance penalties for over-'functionizing' an application?
A: There sure can be. One of the guys that works on profiling tools here says that he sees -- in object oriented languages -- this tendancy to write what he calls "work averse functions." What he means by this is that everything is so factored that there are many many functions each of which does very little and then passes it on to the next function. In straight C programmers don't tend to code that way. The work-averse functions translate directly into much deeper callstacks and much more function call and return overhead. Partly because they're in the worst of all worlds... too big to be inlined yet not big enough to be doing meaty amounts of work. So be careful. Factoring is good but don't go crazy -- you get oophalism that way
A: Yes. Definatelly. Too many short methods that do liitle work called deep on the callstack can significantly affect performance. You should be careful about overfactorizing methods that get called often (in deep callstak loops)”

Berikut artikel2 yg dapat membantu Anda mendesign aplikasi .Net for performance:


Share this post: | | | |
Published Friday, March 18, 2005 11:21 AM by zeddy
Filed under:


No Comments
Powered by Community Server (Commercial Edition), by Telligent Systems