Ten years ago I was teaching .NET classes for a group of developers from Philips Medical Systems. They amazed me with stories about how they were using C# code to process x-ray images live from their medical scanners. At the time this was a very unconventional choice, as most devs would have used C for image processing instead.
I had a great time, and my students even inspired me to teach a class about interfacing C# code with unmanaged C code. But it also got me thinking. With all the power of C# at our fingertips, how far could we push the envelope? Would it be possible to write C# code that can rival C code in terms of raw performance?
I did extensive research on performance optimization and discovered something remarkable: a lot of C# code is needlessly slow, because developers are unaware of some very simple optimization techniques that can speed up their code by up to 1000x.
I created this course to share what I learned about performance optimization with others. The course is perfect for developers who already have a working knowledge of C# programming, but who want to learn simple tricks to tune-up their code and make it run much faster.
‘Great speed up tricks from 10% to 800% faster code! Great explanations, I never quite understood the stack and heap before this, and I am taking college classes on this stuff!’
‘A concise, easy to follow, well explained, accurately depicted, and wonderfully presented five course meal in C# performance! Mark has served up a real hot winner here.’
‘This course is awesome. Especially the example about factory classes saved my life in a project. I have never seen this before. Thank you Mark. You’re the best.’
TOPICS COVERED IN THIS COURSE
The course covers .NET Foundations, learning to read Intermediate Language, performing Basic Optimizations, understanding Garbage Collection, Optimizing for Memory, and performing Intermediate and Advanced Optimizations.
We will cover optimization techniques like array flattening, collection pre-sizing, using structs strategically, enabling pointers to write directly into heap memory, building super-fast dynamic methods by emitting IL instructions, and many others.
In the course, I cover each performance bottleneck in turn. I start by introducing each problem with a small test program to measure the baseline performance. Then I will teach you several possible solutions, and benchmark how each solution measures up.
In the course, you will learn:
– how value types and reference types are stored
– why strings are immutable
– what boxing and unboxing is
– how to read intermediate language
– when to use the StringBuilder class
– how to optimize collections and arrays
– how to optimize loops
– how exceptions can slow down your code
– how to optimize for the garbage collector
– how to use finalizers and the dispose pattern
– when to use structs and classes
– how to speed up delegates
– how to build a super-fast class factory
– how to allocate arrays on the stack
– how to use pointers in C#
And much more!
During the course, I will frequently switch over to the Intermediate Language produced by the C# compiler. I’ll show you how your code gets compiled into IL, and how certain IL instructions can slow down your code unexpectedly.
Are you interested? You get lifelong access to all content, and if you’re unhappy with the course for any reason, I’ll give you a 30-day full refund.
Fundamentals Of The .NET Framework
– The Stack
– The Heap
– Value Types
– Reference Types
– Boxing And Unboxing
– Immutable Strings
A Crash Course In Common Intermediate Language
– Common Intermediate Language
Basic Performance Optimizations
– The Performance Overhead Of Boxing And Unboxing (free preview!)
– Improve String Concatenation Performance
– Use Fast Collections
– Use Fast Arrays (free preview!)
– Using For Versus Foreach
– The Penalty For Throwing Exceptions
A Detailed Look At Garbage Collection
– An Introduction To .NET Memory Management
– Garbage Collection In .NET
– How To Optimize Your Code For Garbage Collection
– Finalisers In .NET
– The Dispose Pattern
Simple Tricks To Improve Memory Allocation
– The Memory Overhead Of Boxing And Unboxing
– Do Not Concatenate Strings
– Use Structs Instead Of Classes
– Initialize Collections To Their Final Size
– Write Efficient LINQ Queries
– Fast Delegates
– Fast Class Factories
– Arrays On The Stack
– Using Pointers – Part 1
– Using Pointers – Part 2
– The course starts when you enroll
– You can take as long as you like to complete the course
– You have Lifelong Access to all content
– You are a C# developer (any level)
– You are interested in Code Performance Optimization
– Fluent in English
– An internet-connected computer
– Visual Studio running on Windows (can be in a Virtual Machine)
– A good working knowledge of C#
SKILLS YOU WILL GAIN
– Optimize your C# code for top performance
– Optimize your code for lean memory usage
– Understand how the garbage collector works
– Read intermediate language
Hour Response Time
You will receive Lifelong Access to all course content.
You can access our Facebook Community Group 24/7 and chat with the instructor team and your fellow students.
You can ask unlimited questions to the instructor team. This course offers response times of Under 24 Hours to all your inquiries.
- Three Month Payment Plan
- $45 p/m
- Two Month Payment Plan
- $65 p/m
- One-Time Payment
I am a blogger, investor, serial entrepreneur, and the author of 11 successful IT courses in the Udemy marketplace. My career spans over two decades during which I’ve been a Founder twice and CTO three times, and I have launched two lean startups in The Netherlands.
I became a Microsoft Certified Trainer in 2005 and started training classes in .NET development, web design, and Microsoft back-office servers. Today I use my extensive knowledge of IT to help CTO’s, architects, and other tech professionals with their leadership, communication, and technical skills.
I hold MCSA and MCSD certifications from Microsoft and am a certified Microsoft Trainer and Scrum master. I also speak fluent English, Dutch, and German.