Introduction to C# performance 

This course will teach you how to speed up your C# code with performance tricks that every professional developer should know.

You’ll learn the fundamentals of the .NET Framework, how the Garbage Collector works, the difference between the stack and the heap, what boxing and unboxing is, and much more!

I’ll even give you a crash course in Intermediate Language so that you can actually read the machine language produced by the C# compiler. We’ll compile a couple of code snippets, take a look at the IL code and see if we can make any improvements.

Here’s What You’ll Get

Training Lectures
Video Lessons
Quizzes
Private Slack Channel
Self-Paced Study
Homework Assignments
Certificate of Completion
Valuable New Skills
Lifetime Access

Training Details

This course will teach you how to speed up your C# code with performance tricks that every professional developer should know.

You’ll learn the fundamentals of the .NET Framework, how the Garbage Collector works, the difference between the stack and the heap, what boxing and unboxing is, and much more!

We’ll also look at array performance, using pointers in C# to manipulate memory directly, and a neat trick to place an array in stack memory for extra performance. 

Throughout the course we will be compiling C# code snippets into Intermediate Language, and then inspecting the compiled code for performance bottlenecks. You’ll learn how to interpret basic IL instructions and read machine code directly.

 

Name: C# Performance Fundamentals.

Format: Self-paced.

Content: training lectures, video lessons, quizzes and coding exercises.

Requirements: a Windows, Mac or Linux laptop with Microsoft Visual Studio or Visual Studio Code.

Support: Slack channel.

Associated certification: none.

 

Sneak Preview

In this complimentary training lecture I will teach you how to optimize arrays in C#. We’ll look at 1-dimensional arrays, multidimensional arrays and jagged arrays and compare the performance of all three. You will also learn a technique called Array Flattening to speed up 2-dimensional arrays.

Training Curriculum

Introduction

Course prerequisites

Introduction to code optimization

Fundamentals of the .NET Framework

Introduction

Quiz

The Stack

Quiz

The Heap

Quiz

Value Types

Quiz

Reference Types

Quiz

Boxing and unboxing

Quiz

Immutable Strings

Recap

Basic Optimizations: the low-hanging fruit

Introduction

How to prevent boxing and unboxing

Fast string concatenation

Fast collections

Fast arrays

Throwing and catching exceptions

For versus Foreach

Coding Exercises

Recap

Quiz

Intermediate Optimizations

Introduction

Fast Garbage Collection (Part 1 and Part 2) 

Fast delegates

Fast class factories

Recap

Quiz

A crash course in Intermediate Language

Introduction 

Common Intermediate Language

Recap

Quiz

Advanced Optimizations

Introduction

Arrays on the stack

Pointers (Part 1 and Part 2)

Background Info – Modifying String Constants

Recap

Quiz

In Conclusion

What you´ve learned

Bonus lecture

Sign Up For This Training

This is a self-paced training where you can learn at your own pace and in your own time. All lectures are prerecorded and you can spend as much time as you like on the homework assignments. You’ll be fully supported in our private Slack channel.
The listed price is ex EU VAT. Non-Dutch EU businesses can waive the VAT by providing their tax number during checkout.

Looking For Something Else?

CHECK OUT MY OTHER TRAINING COURSES

Is this training course not exactly what you’re looking for? No problem, I have many other C# courses in my catalog. Take a look at these alternatives.

“Mark introduces great and consistent ways to study differences in performance throughout this course. Applies to both business app programmers as well as game devs. Very very good!”

Rune Solberg, online student

Frequently Asked Questions

  • This Training
  • Self-Paced Training
  • Guided Training
  • Classroom Training
What is included in this training?
You will receive lifetime access to training lectures, video lessons, quizzes and homework assignments.
How long will it take me to complete this training?
For a self-paced and guided training, you can spend as much or as little time you want on the lectures and labs. It’s entirely up to you how long you take to complete the training. For a classroom training, we will complete all of the training content and labs together in 3 days.
How long do I have access to the training content?
You have lifetime access to all training content.
What do I need for this training?
You’ll need a Windows laptop (or other operating system running a Windows virtual machine) with a recent version of the NET Core Framework and the Visual Studio Code editor installed. You will also need Microsoft Teams if you’re attending the live classroom training. 
For which certification does this training prepare me?
This training is not part of an official Microsoft certification path, but you can use it to prepare for the Azure Data Scientist or Azure AI Engineer certifications if you like. 
What is a self-paced training?
In a self-paced training, you study the training lectures and work on the lab assignments in your own time and at your own pace. You can spend as many or as little hours per week as you want on the training. This training format is ideal for tech professionals who have irregular work hours and cannot commit to a classroom training. 
How am I supported in a self-paced training?
I will support you in a private Slack channel. You can ask me anything you want anytime you like, and I will respond as soon as I’m able to. I typically respond in 2-3 hours but it can take a little longer if we are in different timezones. 
Who should attend a self-paced training?
A self-paced training is ideal for tech professionals who can work independently and only need a little support throughout the training to learn the content and complete the lab exercises.
My colleagues and I want to sign up as a team and learn together. Is this possible?
No, self-paced training is only for individual students who each learn at their own pace. Please consider a classroom training instead.
What is a guided training?
In a guided training, you study the training lectures and work on the lab assignments in your own time and at your own pace. We will also spend some time together in a series of Microsoft Teams calls in which I will support you with the training lectures and the lab exercises and help you get ready for the certification exam.
How am I supported in a guided training?
I will support you in a private Slack channel, and you can also book an unlimited number of 1-hour Microsoft Teams support calls with me. In these calls, I will support you with the training lectures and the lab exercises and help you get ready for the certification exam. 
Who should attend a guided training?
A guided training is ideal for tech professionals who prefer a healthy mix of guidance and independence with an average level of support throughout the training to learn the content and complete the lab exercises.
My colleagues and I want to sign up as a team and learn together. Is this possible?
No, guided training is only for individual students who each learn at their own pace. Please consider a classroom training instead.
What is a classroom training?
A classroom training is a live event in which I will present the training lectures, help you complete the lab exercises and get you ready for the certification exam. Classroom trainings are conducted online in full-day Microsoft Teams calls held during business hours in the Central European timezone. You will be sharing the classroom with other students and learn together as a group. 
When and where is classroom training conducted?
Classroom trainings are conducted online during Central European business hours. You will receive a Microsoft Teams link when you sign up for a class. Please note that classroom trainings can also be held on-site at your place of work. Please book a discovery call with me if you’re interested, and we can discuss your requirements.
How am I supported in a classroom training?
I will continuously support you live, because we’ll both be in the same virtual classroom together. 
Who should attend a classroom training?
A classroom training is ideal for tech professionals who can commit to full days of learning and want to learn together as a group. 
My colleagues and I want to sign up as a team and learn together. Is this possible?
Yes, absolutely. Please book a discovery call with me to discuss your requirements. I can offer group discounts to business teams.