What I love about this series is that you have an expert who could, if asked to do so, completely overwhelm most regular developers with technical detail and advanced topics, but you also have a seasoned non-expert (in this area anyway) sitting in to ask questions and explore the knowledge space in a way that is comfortable for most mere mortals.
I love this series. I really enjoy hearing Toub talk about these deep concepts. One request: get Toub a better mic :). Occasionally his voice got really quiet and it was hard to hear what he was saying.
Locking content next could be really interesting. ConcurrentDictionary, lock, Semaphore, SemaphoreSlim etc. I think most developers (me included) use and take these for granted without really knowing what they’re doing behind the scenes
2 หลายเดือนก่อน +7
Great episode. Suggestion for topics could be some math stuff like using optimized vectors SIMD etc. I think Tanner Gooding focuses on that area? Or various synchronization mechanisms in .NET (lock/Semaphore/SemaphoreSlim/new System.Threading.Lock.
Great series, clear explanations. Maybe a future episode on how System.Threading.Channels are implemented(comparison with other producer consumer collections) or some concurrent collections internal implementations.
can you make a deep dive on how to correctly measure performance? it seems trivial at first but I feel like there are so many things people do wrong when measuring
So cool to get insights on how the framework actually works, and how it is expected to be used. The internet was definitely lacking content of that level of expertise, and I hope deep dotnet will continue for a long time. So excited to hear there'll be more guests, although I could be listening to Stephen for hours. He did set the standard at quite the level!
Great, as always! Please schedule these so we know they are coming! Also, I would love a deep dive on Kestral internals and all the great work put into that over the last few years.
Love this series! It's very interesting (and useful!) to get a glimpse of the inner workings and tradeoffs you talk about. As a game developer I tend to use _a lot_ of pooling, accepting the increased memory use and the sometimes reduced linear performance over having the GC kick in and cause frame drops that are very noticeable for the player. I hope this is a use case that is considered as well :)
Thanks for bringing up this topic! It's very interesting and instructive. I really like the 'Deep Dot Net' video series-there's always so much more to learn and ideas to draw inspiration from. Thanks for organizing it, and special thanks to Stephen for sharing his valuable knowledge!
Awesome content y'all. How about some content on how to diagnose CPU/memory performance problems? Maybe even some heapdump in windbg/sos stuff. Maybe a look under the hood of how .NET heap objects work. Maybe you could pull in Tess or Maoni for that?
I wager many will appreciate the attention given to the issue of analysis paralysis. Perhaps it's for the best that multi-threaded resource sharing largely goes over my head...
Next in the series: - Deep dive into garbage collector. - an even deeper dive into garbage collector. Please... I am really looking forward to this topic.. Anyone else wants to learn GC from @SthephenToub.
Again a great episode! For the future I'd be really interested in a episode about boxing, as there are some quite hidden pitfalls that can cause high GC pressure. Things like interfaces on value types, equality checks and maybe more common, but non obvious problems? Btw: Really looking forward to the yearly Performance Improvements blog post :)
If the array returned from the pool could be up to almost twice the size requested, I take it when iterating the array we should only ever go up to the length we requested as the rest could be garbage data? Being aware that the array's length is actually the next power of 2 we could populate the full array if we wanted to, but if you did a for loop with the end condition being the array's length, you could exceed your original requested length, which you may not have populated. Sorry if that was mentioned in the video and I missed it. Thanks for the videos, they're really useful and insightful.
Yes, you need to be careful. That's a common mistake. My tip would be use AsSpan() on the returned pooled array as soon as possible and only working on the span: `var span = arrayFromPool.AsSpan(0, requestedLength);`
@StephenToub Around 44:28 in the video, I was wondering, why isn't there an overload like `bool TryRent(int minimumLength, out T[] array)` where you can decide not to allocate at all and use some other slower path that is still significantly faster than allocating a fresh new array?
I would have liked an explanation why default collections like a List do not use ArrayPool. As lists usually grow over time it would be a nice use case for a pool to avoid a lot of allocations or not?
When async call is made for network request, how operating system invokes back dotnet runtime when the network request gets completed? Could you go even deeper and explain, how a normal async httpcall or system timer gets registered with epoll (in linux)? Can you write a simple timer which registers with operating system and gets invoked by operating system?
My guess would be because int is CLS compliant, while uint is not. That matters while building the standard library and not while building your own library, but I guess Stephen is used to working on the standard library. CLS compliance matters because .NET code can be called by many different languages, some of which might not have the concept of unsigned integer.
What I love about this series is that you have an expert who could, if asked to do so, completely overwhelm most regular developers with technical detail and advanced topics, but you also have a seasoned non-expert (in this area anyway) sitting in to ask questions and explore the knowledge space in a way that is comfortable for most mere mortals.
I'm really loving these "let's make a simple version of X so you understand it" videos!
I love this series. I really enjoy hearing Toub talk about these deep concepts.
One request: get Toub a better mic :). Occasionally his voice got really quiet and it was hard to hear what he was saying.
Locking content next could be really interesting. ConcurrentDictionary, lock, Semaphore, SemaphoreSlim etc. I think most developers (me included) use and take these for granted without really knowing what they’re doing behind the scenes
Great episode. Suggestion for topics could be some math stuff like using optimized vectors SIMD etc. I think Tanner Gooding focuses on that area? Or various synchronization mechanisms in .NET (lock/Semaphore/SemaphoreSlim/new System.Threading.Lock.
Would love to see a similar video going in depth about the GC. Love this duo!
This is fast becoming my favorite series of your channel, and I really loved this episode
Great series, clear explanations. Maybe a future episode on how System.Threading.Channels are implemented(comparison with other producer consumer collections) or some concurrent collections internal implementations.
Over an hour of two legends! I'm a simple man, I click, I watch!
found the comment to like - cheers hahaha
That doggo looks sooo relaxed sleeping on the couch
can you make a deep dive on how to correctly measure performance? it seems trivial at first but I feel like there are so many things people do wrong when measuring
This is so great. Everytime I watch Stephen I'll learn something new
Love these roll-your-own videos, keep em coming plz!
Small request: Can you use a dark theme? My eyeballs are burning after that.
So cool to get insights on how the framework actually works, and how it is expected to be used. The internet was definitely lacking content of that level of expertise, and I hope deep dotnet will continue for a long time. So excited to hear there'll be more guests, although I could be listening to Stephen for hours. He did set the standard at quite the level!
Great, as always! Please schedule these so we know they are coming!
Also, I would love a deep dive on Kestral internals and all the great work put into that over the last few years.
Just started and already know this gonna be a banger of a video
Love this series! It's very interesting (and useful!) to get a glimpse of the inner workings and tradeoffs you talk about. As a game developer I tend to use _a lot_ of pooling, accepting the increased memory use and the sometimes reduced linear performance over having the GC kick in and cause frame drops that are very noticeable for the player. I hope this is a use case that is considered as well :)
I see Stephen and Scott, I like
Thanks for bringing up this topic! It's very interesting and instructive. I really like the 'Deep Dot Net' video series-there's always so much more to learn and ideas to draw inspiration from. Thanks for organizing it, and special thanks to Stephen for sharing his valuable knowledge!
These videos are so great and interesting. Thanks.
And the best series continues 🎉
Wow!! Such an amazing Deep .NET episode... See how the complex stuff is created from simple bricks by Stephen is kind of magic
didn't know you could do an assignment in a ternary operator. Thanks again for the video. Awesome!
Assignment is an expression, so you can put it almost anywhere.
Awesome content y'all. How about some content on how to diagnose CPU/memory performance problems? Maybe even some heapdump in windbg/sos stuff. Maybe a look under the hood of how .NET heap objects work. Maybe you could pull in Tess or Maoni for that?
I wager many will appreciate the attention given to the issue of analysis paralysis. Perhaps it's for the best that multi-threaded resource sharing largely goes over my head...
Next in the series:
- Deep dive into garbage collector.
- an even deeper dive into garbage collector.
Please... I am really looking forward to this topic..
Anyone else wants to learn GC from @SthephenToub.
Can't wait for that performance blog post for dotnet 9!
Thanks Guys. This is the best programming content I've enjoyed this year.
I thought you stopped...welcome back Task.Run()
Really like these deep dives! Thank you
Again a great episode!
For the future I'd be really interested in a episode about boxing, as there are some quite hidden pitfalls that can cause high GC pressure. Things like interfaces on value types, equality checks and maybe more common, but non obvious problems?
Btw: Really looking forward to the yearly Performance Improvements blog post :)
We want more topics covered from stephen than others
If the array returned from the pool could be up to almost twice the size requested, I take it when iterating the array we should only ever go up to the length we requested as the rest could be garbage data?
Being aware that the array's length is actually the next power of 2 we could populate the full array if we wanted to, but if you did a for loop with the end condition being the array's length, you could exceed your original requested length, which you may not have populated.
Sorry if that was mentioned in the video and I missed it.
Thanks for the videos, they're really useful and insightful.
Yes, you need to be careful. That's a common mistake. My tip would be use AsSpan() on the returned pooled array as soon as possible and only working on the span: `var span = arrayFromPool.AsSpan(0, requestedLength);`
Finally a new Episode 🎉🔥
I listened like Stephen’s dog 😅 We love this series please do more often
We need more!!! Thnks a lot!
Always learning from you two! Keep up the great content!
Another very nice explanation, as always. Thanks.
First time ever Microsoft is actually teaching something
I’ve been here putting out content for 17 years, I’m gonna go ahead and say that this was not the first time 😂
Very informative! Thank you.
Would love to have Maoni Stephens come to the show to talk a bit about the GC.
@StephenToub Around 44:28 in the video, I was wondering, why isn't there an overload like `bool TryRent(int minimumLength, out T[] array)` where you can decide not to allocate at all and use some other slower path that is still significantly faster than allocating a fresh new array?
Yet another gem!
i like it, only issue is there is a lot of small mic cut while talking, if you fix this next time
Great as usual.
Excellent!
A gold mine.
Wow!!!!!!!!!!!!!!!!!!!!
It's been a century since the last update
I would have liked an explanation why default collections like a List do not use ArrayPool.
As lists usually grow over time it would be a nice use case for a pool to avoid a lot of allocations or not?
Why can’t we have more of Stephen’s
21:09 "I love it when copilot just does stuff for me. Especially when I'm going to delete the code after"😂
Amazing ❤
Finally!!!
thanks for the pools.
opps i mean show
Copilot completion is distracting…
Agree
19:46 Why not use uint instead?
When async call is made for network request, how operating system invokes back dotnet runtime when the network request gets completed?
Could you go even deeper and explain, how a normal async httpcall or system timer gets registered with epoll (in linux)?
Can you write a simple timer which registers with operating system and gets invoked by operating system?
In Windows, look for IO Completion Ports (IOCP) and overlapped IO.
🎉🎉
❤❤❤❤
13:40 does anybody know why he assigned the global variable to local first?
Are you talking about `T? item = _item;`?
It's because we need to make _item null before returning. Look at lines 18 and 19 at 13:52.
Hi. At 17:53, what does ??= mean? I cant find it on google
`a ??= b;` means `if (a is null) a = b;`
Search for "C# null-coalescing assignment".
It means if the left side is null, assign the right side to it. Otherwise, do nothing. Basically this:
if (left is null)
{
left = right;
}
It's a really awesome topic to bathe in.. 🚿 yeah
I lack the basic knowledge of why would I use arraypool in first place. It allocates 30 concurrentqueues
Dogo at 22:06. :)
33:47 deficiency cores? yes these are definitely what efficiency cores are haha
good to see the Doodle passed out on the couch. That's where they belong!!!
Les't talk about GC
19:46 Why not use uint instead?
My guess would be because int is CLS compliant, while uint is not. That matters while building the standard library and not while building your own library, but I guess Stephen is used to working on the standard library.
CLS compliance matters because .NET code can be called by many different languages, some of which might not have the concept of unsigned integer.