
Ask HN: C# performance-oriented code challenges - pestkranker
I want to challenge myself doing performance enhancements. Any ideas of existing resources?
======
bold_monkey
It depends on your goals, if you want a deep understandigyou must learn ho CLR
works:

This book can be a good start: > [https://www.amazon.com/CLR-via-4th-
Developer-Reference/dp/07...](https://www.amazon.com/CLR-via-4th-Developer-
Reference/dp/0735667454)

Anyway, if you have specific needs, the knowledge needed may vary. For LOB
applications (IMHO) very often performance issue have to be searched in I/O
(RDMS / WebServices / RPC), these times in all depends a lot on query tuning,
optimization of data transfer via specific binary protocols etc... so C#
internals not come to an help (even if i think that knowing it may be really
precious).

If you are facing applications with numerical analysis and/or greedy algorithm
you could give a look at stackalloc/unsafe programming. This links is a good
start:

[http://content.atalasoft.com/h/i/58208059-improving-
performa...](http://content.atalasoft.com/h/i/58208059-improving-performance-
through-stack-allocation-net-memory-management-part-2)

Hope this helps :)

~~~
GFischer
Indeed, I work on .NET based LOB applications and performance bottlenecks are
99% due to bad SQL optimization.

Azure tuning is now in 2nd place for performance optimization.

I've personally never had to look very deep into the CLR, and I've worked for
some large scale apps.

