Micro-optimization, or worrying about performance during development can be a waste of time. Most likely the improvement you make won’t be in the critical path, will be negligible, or worst of all increase the complexity and readability of your code for a minimal advantage.
Is there any impact in execution performance because of using
array.Length directly as
for exit condition? Which one of following methods will excute faster?
Dmitry Yudakov concludes through digging into the IL code generated by JIT compiler for both methods:
… both methods will compile into the exact same code, but the first one is written faster, even though there isn’t any benefit in terms of execution time.
Michael Shpilt, in this article, provides eight techniques to minimize GC pressure and improve the performance of your .NET application. GC Pressure is when the GC doesn’t keep up with memory deallocations and application spend more time on garbage collection and less executing actual code.
MythBusters JS is an open source handbook to explore various best practices, performance patterns, and tips obtained from engineering posts blog, podcasts, conference videos, etc. You can also share your performance tip or pattern by creating a pull request in MythBusters JS GitHub repository.
Markus Frind has posted his experience of using ASP.NET 2.0 for one of largest dating site PlentyOfFish.com in Canada. In his post, Markus is telling how he has addressed concurrency issues by switching to ASP.NET 2.0:
At this point there were a lot of concurrency issues, the site would slooow down and just keep getting slower as more people came on. After switching to asp.net 2.0 all those problems went away. Now when there are over 32,000 concurrent connections at peak the site does not slow down. There are however still problems. I find that once you pass 100 Pageviews/second threads timers start to not get called for no reason.
He Interestingly didn’t use any kind of caching to render pages. Every page call actually pulls content from the database.