Data Ahna o

LINQ Performance Tips (Video Series)

2020.08.17 22:45 levelUp_01 LINQ Performance Tips (Video Series)

Hi All
I've decided to record a video series about LINQ performance.
Most of us use LINQ expressions but we often forget that they will do a lot of hidden allocations under the hood and they will affect the throughput of the entire system or the compiler will generate code that's very slow and we were thinking that our expression is clever and fast.
Currently, there are five videos but I plan to add more to the list. (should I post them here or would you rather not see them?)
I know that not everyone is fond of the Video format (TBH it's easier to record something semi-structured) so I'm planning to write an article that will contain all of the information from the videos in a more thought out form.
Let me state that I'm not trying to bash LINQ but improve it and provide examples of other frameworks that try to do the same.

C# LINQ Performance Tips #3
This video talks about LINQ "Where" operator and why boxing and accidental heap allocations hurt performance. Additionally, in this video, we implement a custom "Where" and "ToList" methods.
https://youtu.be/wUY-UdkI6GQ
C# LINQ Performance Tips #2
A video that corrects a couple of mistakes that were made in my previous video called "C# LINQ Performance Tips #1". We're talking about structs vs classes in LINQ and why losing concrete type information is bad, there's also a bit of VSD but it's very vague and generic so the more specific video is needed, I just wanted to tell you that it exists :)
https://youtu.be/atUpAx_0lqg
C# LINQ Performance FIX #1
A video that corrects my lat example in my previous video, since the group by example is not faster in LINQ and you have to try hard to implement better. Turns out that I forgot to materialize the query and I was just measuring expression tree building. So each group by the sample that wasn't LINQ was from 2x to 5x times faster. I still think that the built-in Lookup is a robust data structure but materialization absolutely eats performance no matter what.
https://youtu.be/GGHZbJsEtJw
C# LINQ Performance Tips #1
A video that shows where LINQ absolutely fails and what operators in LINQ rock and it's hard to make better ones.
Warning the information about Last() is outdated it used to work like outlined in the video but got updated a couple of years ago, that's why: C# LINQ Performance Tips #2 corrects the error.
https://youtu.be/Dv_nsoEmC7s
Performance bottlenecks in C# LINQ
A video that shows how hidden allocations happen in LINQ and how to avoid them, and if impossible how to write allocation free alternative.
https://youtu.be/ahnaIdQMoYw
All in all some things are messy, some things could be explained better and I'm hoping to do better in the future, but for now, I hope that you get something out of the videos.
Enjoy :)
submitted by levelUp_01 to dotnet [link] [comments]


2020.08.13 22:47 levelUp_01 LINQ Performance Tips (Video Series)

Hi All
I've decided to record a video series about LINQ performance.
Most of us use LINQ expressions but we often forget that they will do a lot of hidden allocations under the hood and they will affect the throughput of the entire system or the compiler will generate code that's very slow and we were thinking that our expression is clever and fast.
Currently, there are four videos but I plan to add more to the list. (should I post them here or would you rather not see them?)
I know that not everyone is fond of the Video format (TBH it's easier to record something semi-structured) so I'm planning to write an article that will contain all of the information from the videos in a more thought out form.
C# LINQ Performance Tips #3
This video talks about LINQ "Where" operator and why boxing and accidental heap allocations hurt performance. Additionally, in this video, we implement a custom "Where" and "ToList" methods.
https://youtu.be/wUY-UdkI6GQ
C# LINQ Performance Tips #2
A video that corrects a couple of mistakes that were made in my previous video called "C# LINQ Performance Tips #1". We're talking about structs vs classes in LINQ and why losing concrete type information is bad, there's also a bit of VSD but it's very vague and generic so the more specific video is needed, I just wanted to tell you that it exists :)
https://youtu.be/atUpAx_0lqg
C# LINQ Performance FIX #1
A video that corrects my lat example in my previous video, since the group by example is not faster in LINQ and you have to try hard to implement better. Turns out that I forgot to materialize the query and I was just measuring expression tree building. So each group by sample that wasn't LINQ was from 2x to 5x times faster. I still think that the built-in Lookup is a robust data structure but materialization absolutely eats performance no matter what.
https://youtu.be/GGHZbJsEtJw
C# LINQ Performance Tips #1
A video that shows where LINQ absolutely fails and what operators in LINQ rock and it's hard to make better ones.
Warning the information about Last() is outdated it used to work like outlined in the video but got updated a couple of years ago, that's why: C# LINQ Performance Tips #2 corrects the error.
https://youtu.be/Dv_nsoEmC7s

Performance bottlenecks in C# LINQ
A video that shows how hidden allocations happen in LINQ and how to avoid them, and if impossible how to write allocation free alternative.
https://youtu.be/ahnaIdQMoYw
All in all some things are messy, some things could be explained better and I'm hoping to do better in the future, but for now, I hope that you get something out of the videos.
Enjoy :)
submitted by levelUp_01 to csharp [link] [comments]


2020.02.07 20:41 shleebs When voting on Feb. 11th, don't forget..

Don't forget the questionable connections between, ACRONYM, Shadow Inc, Pete Buttigie and possibly the Iowa caucus (within reason and using legitimate sources).
Doesn't matter when he paid them or why. His campaign has deep ties to ACRONYM. That's sketchy.
submitted by shleebs to newhampshire [link] [comments]