Stop Using Exceptions in C#! Here’s Why and What to Do Instead
Автор: Filip Ekberg
Загружено: 2024-12-05
Просмотров: 3590
Exceptions in C# are notoriously slow and should be avoided at all cost! If you are using exceptions for normal flow control, you need to watch this video!
By simply using other patterns and practices you can reduce the memory footprint and greatly improve throughput in your applications. If you are custom to using domain exceptions, you need to rethink your decisions and avoid exceptions!
You won't be able to get rid of exceptions completely, and you should still plan your code as if failures can occur, but avoid using exceptions for normal flow control.
Source code available here: https://github.com/fekberg/avoid-exce...
Check out my course on C# Benchmarking and Profiling: https://www.pluralsight.com/courses/c...
Follow me on X: @fekberg
Follow me on Bluesky: https://bsky.app/profile/fekberg.bsky...
Check out my courses on Pluralsight: https://pluralsight.pxf.io/d1MRK
DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the links, I may receive a small commission.
00:00: Introduction
01:25: Alternatives to exceptions
02:15: Result Pattern
03:25: BenchmarkDotNet
04:24: Comparing different runtimes
05:15: Benchmark results
06:40: Extending the benchmarks
07:04: Final results
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: