A Complete .NET Developer's Guide to Span with Stephen Toub

Поделиться
HTML-код
  • Опубликовано: 28 май 2024
  • Scott and Stephen are back with another entry in the Deep .NET series, this time looking deep at System.Span enabling the representation of contiguous regions of arbitrary memory, regardless of whether that memory is associated with a managed object, is provided by native code via interop, or is on the stack. And it does so while still providing safe access with performance characteristics like that of arrays. Let's go deep on Span.
    Chapters:
    00:00:00 Exploring the Impact and Evolution of Span in Software Engineering
    00:03:09 Deep Dive into Assembly Code and its Translation
    00:04:15 Exploring Methods to Disassemble and Analyze C# Function
    00:05:43 Exploring the JIT Compiler and Assembly Code Optimization
    00:12:03 Understanding Arrays and Pointers in Programming
    00:16:46 Understanding Memory Management and Array Access in Programming
    00:24:35 Discussing the Cost and Implementation of Memory Management Functions
    00:26:23 Exploring the Intersection of Performance, Maintenance, and Interop in Programming
    00:31:51 Understanding the Concept and Impact of Span in Computer Science
    00:39:28 Discussion on Memory Protection and Immutability in Unix and Windows
    00:45:59 Implementing and Understanding the Concept of Ref Functions in C#
    00:51:08 Exploring JavaScript Optimal Notation and Memory Management
    00:54:28 Exploring the Implementation and Functionality of Span in Programming
    00:59:53 The Evolution and Impact of Span in .NET Development
    Resources:
    Documentation: learn.microsoft.com/dotnet/st...
    Connect with .NET:
    Blog: aka.ms/dotnet/blog
    Twitter: aka.ms/dotnet/twitter
    TikTok: aka.ms/dotnet/tiktok
    Mastodon: aka.ms/dotnet/mastodon
    LinkedIn: aka.ms/dotnet/linkedin
    Facebook: aka.ms/dotnet/facebook
    Docs: learn.microsoft.com/dotnet
    Forums: aka.ms/dotnet/forums
    🙋‍♀️Q&A: aka.ms/dotnet-qa
    👨‍🎓Microsoft Learn: aka.ms/learndotnet
    #dotnet
  • НаукаНаука

Комментарии • 130

  • @barrysphone
    @barrysphone 6 дней назад +9

    This series is awesome, please keep it going for a long time. Stephen's knowledge is incredible and his enthusiasm is infectious. The dynamic between Scott and Stephen make this series unmissable.

  • @1camper69
    @1camper69 13 дней назад +19

    These talks from Stephen are truly the best dotnet content available. Stephen has the knowledge and goes next level in explaining it extremely clear but simple and is just a joy to listen to.

  • @marklord7614
    @marklord7614 15 дней назад +90

    Man, these guys are killing it with the series -- great topics.

  • @BloodHaZaRd666
    @BloodHaZaRd666 15 дней назад +69

    Like video at 0 seconds just because of @Stephen Toub

    • @akeemaweda1716
      @akeemaweda1716 15 дней назад +4

      Not you alone. I did exact same thing, because it's the wizards show!

    • @asedtf
      @asedtf 15 дней назад +4

      Like this comment at 1 second because I had to stop to like the video first because of Stephen Toub

    • @thomastaylor648
      @thomastaylor648 14 дней назад +3

      We need more Stephen Toub's

  • @lordtony8276
    @lordtony8276 2 дня назад +2

    "Have you got anything without Span?"
    "Well, there's Span Span List and Span, that's not got much Span in it."

  • @MatteoGariglio
    @MatteoGariglio 15 дней назад +31

    This series of videos featuring Stephen Toub is truly remarkable and incredibly interesting. Thank you!

  • @The.WorldVentures
    @The.WorldVentures 15 дней назад +50

    How does someone even become as great as Stephen Toub, man the guy knows his stuff.

    • @jackkendall6420
      @jackkendall6420 14 дней назад +10

      You do it as your fulltime job for multiple decades, haha.

    • @kaolyfe-cw2cm
      @kaolyfe-cw2cm 13 дней назад

      Pray enough to the coding gods...j/k 😄

  • @Tamazakis
    @Tamazakis 15 дней назад +21

    TimeSpan well spent! Thank you :)

  • @CuriouslyContent
    @CuriouslyContent 15 дней назад +18

    I can't get enough of this content :) Who would have thought that an hour long video on spans is literally the most exciting thing on my feed this week!

  • @FICHEKK
    @FICHEKK 15 дней назад +13

    Learning from Stephen Toub is such a pleasure, man is a .NET master!

  • @draganradovac8803
    @draganradovac8803 3 дня назад

    Scott and Stephen are a great combo. Looking forward to future presentations.

  • @weirdwyrd2017
    @weirdwyrd2017 9 дней назад +2

    That floppy drive jumper comparison got me. The assembly I could follow, ain't never heard of a jumper before. Today I learned a couple things! Great content!

  • @ElSnakeObwb
    @ElSnakeObwb 15 дней назад +28

    Love this series. keep it up

  • @behboodik
    @behboodik 15 дней назад +6

    Every video with Stephen in it is a treasure

  • @fieryscorpion
    @fieryscorpion 14 дней назад +3

    This is amazing!
    Now I need a video on Multithreading and Parallel Processing from Scott and Stephen!

  • @lstutzman
    @lstutzman 15 дней назад +7

    Fantastic content guys!! Can’t wait for the next one. A deep dive into the GC would be cool

  • @TheChonsey
    @TheChonsey 14 дней назад +7

    Awesome content. Please make a video on System.IO.Pipelines

  • @dlandi
    @dlandi 13 дней назад +3

    Scott and Stephen: Outstanding series!

  • @amrswalha
    @amrswalha 15 дней назад +4

    Scott and Stephen are doing a great job, all the best.

  • @sanampakuwal
    @sanampakuwal 15 дней назад +9

    WOW!!! Love these series, please don't stop!

  • @MarkRendle
    @MarkRendle 14 дней назад +3

    It's crazy how simple Span is on the inside considering the impact it's had on .NET in recent years.

  • @BryanKelly
    @BryanKelly 8 дней назад +1

    How does Span relate to Memory? I'd love to see a follow up to this that gets into that detail.

  • @delphiguy23
    @delphiguy23 15 дней назад +2

    I saw Stephen Toub, I clicked.... freaking awesome presentation learned a lot from this.

  • @superpcstation
    @superpcstation 15 дней назад +4

    Please don't stop making these!

  • @JavedaliShaikh-yy1jr
    @JavedaliShaikh-yy1jr День назад

    Just Brilliant! Keep making more of these.. Thanks.

  • @wimzi9887
    @wimzi9887 8 дней назад +1

    I wanna watch Stephen build a complex project from start to finish. I would love to see how he works.

  • @ChaoticNeutral6
    @ChaoticNeutral6 10 дней назад

    That was wild, I definitely want to see a part 2. Would also be cool to go through stuff like MemoryMarshall and its methods

  • @freierNamen
    @freierNamen 14 дней назад +1

    Oh no, it happened again!
    The video is over and I've already seen all parts of the series😢😂
    Thank you so much! Love every second of it...

  • @tayyabshaikh3286
    @tayyabshaikh3286 9 дней назад

    Pure Knowledge Sharing.. & No dumb podcast like others.. Truly Marvelous.

  • @SajadJalilian
    @SajadJalilian 12 дней назад

    Dotnet has many layers of abstractions in a good way. They are like magic. Watching this series is like those videos in which a magician explains how they are doing their tricks under the hood. I love it.

  • @fatlumlatifi2897
    @fatlumlatifi2897 15 дней назад +1

    Excellent video, please keep Mr. Toub on a few more episodes. As of topics to cover if possible please make video on how to interop or preferably make binding of C libraries on .NET.

  • @mey33am
    @mey33am 15 дней назад +1

    Keep posting Stephan! We need more content like this, Thank You

  • @alexisfibonacci
    @alexisfibonacci 14 дней назад +3

    I haven't seen Bart De Smet in years. Is he available to talk about IObservable? Why has there been less emphasis on it in recent times? Also IQbservable..

  • @levimatheri7682
    @levimatheri7682 11 дней назад

    Stephen Toub is my spirit animal. So smart!

  • @colhountech
    @colhountech 14 дней назад +1

    Best Content On youtube today. I love the relaxed page and the high intensity content. It's almost an anti pattern of all the click-bate, gapless, b-roll crap on youtube today.
    If stephen does a workshop of stuff like this in NDC London next year, I'll drop $2000 to attend like when Dave and Damiean did the early workshops on .net core in circa 2017.

  • @dy0mber847
    @dy0mber847 15 дней назад +5

    Incredible as always

  • @LasseVagstherKarlsen
    @LasseVagstherKarlsen 14 дней назад +1

    Man, you guys nailed it as usual, absolutely love these videos. GC next? 🙂

  • @user-yf8fi7lc5s
    @user-yf8fi7lc5s 15 дней назад +3

    Like in the good old days of Channel 9 👍

  • @imranhussain8700
    @imranhussain8700 10 дней назад

    Async/Await
    LINQ
    RegEx
    Span
    😀😀😀😀😀😀😀😀😀😀😀😀😀😀
    Loving it.
    Thank you very much. Great Content.

  • @SimoLPers
    @SimoLPers 7 дней назад

    The series is really great! Thanks for sharing! ME me I'd personally love to see how what lies under the hood of reflection.

  • @DavidPereira-lc1yq
    @DavidPereira-lc1yq 14 дней назад

    This is freaking awesome!!! Right from the source, you should build a comprehensive "deep C# course" with all of this, for people that would like to purse perf related topics. Right now, I don't think there's a place where you can do that. It's basically spread around books, courses, blogs, etc etc.
    Really nice this one.

  • @sgwong513
    @sgwong513 10 дней назад

    its the only video I need to watch to learn what is Span in .net

  • @MehrdadSoltani-qn2ny
    @MehrdadSoltani-qn2ny 15 дней назад +1

    one of the best demo/tutorials I have ever seen about Span.

  • @djchrisi
    @djchrisi 14 дней назад +1

    28:30 unsafe ist really a great keyword because it truly scares developers off ;)

  • @norm6096
    @norm6096 15 дней назад +2

    You guys are awesome combo, thanks for the videos! :)

  • @SlackwareNVM
    @SlackwareNVM 15 дней назад +1

    I'm interested in the meaning behind that last constructor check. Also, what are the tradeoffs from the alternative implementations you mentioned?
    Would love to know more about Memory as well. I don't yet have proper intuition of how to use it.

  • @rodrigolima206
    @rodrigolima206 11 дней назад

    Very nice explanation thanks a lot. I would like to see something related to streams and how they work I was always curious about that. If possible, of course. Thanks again .

  • @timur2887
    @timur2887 11 дней назад

    Thank you very much! Great content!

  • @AndrzejPauli
    @AndrzejPauli 13 дней назад

    StephenT and ScottH - nothing is better 🙂

  • @GuildOfCalamity
    @GuildOfCalamity 15 дней назад

    Keep doing these with Stephen; would like to see more roll-your-own content, like the Async/Task video.

  • @WizardofWestmarch
    @WizardofWestmarch 14 дней назад

    At 38:48 Toub is talking about how if you have a readonly span it will put it in the data block of the binary. Do things like ImmutableArray get the same benefit or is the JIT compiler extra aware of ReadOnlySpan to do that optimization?

  • @fedayka
    @fedayka 14 дней назад

    The worst thing about this show is its time constraint! Great content guys! Amazing :)

  • @tirgo007
    @tirgo007 15 дней назад

    Great stuff! Looking forward to the next one.

  • @hashdynamics978
    @hashdynamics978 13 дней назад

    my new favorite tv show. Love it!

  • @AskFiqri
    @AskFiqri 14 дней назад

    This is a treat

  • @enijburg
    @enijburg 15 дней назад

    Another great session! Keep them coming 🎉

  • @preet1979
    @preet1979 13 дней назад

    This was a great video. All I need now is another deep dive video into Memory to complete my understanding of it. Thanks again for such a great video.

  • @uitumenj8380
    @uitumenj8380 15 дней назад

    I’m value added :))) thank you guys!

  • @JakobStrasser
    @JakobStrasser 15 дней назад

    Thanks, very informative!

  • @schlott1970
    @schlott1970 15 дней назад +1

    My biggest question was how, using span, was the compiler able to keep such a tight loop when enumerating? Also could have mentioned that span does not allocate any memory or copy stuff around! This was a good one Scott/stephen! Thankyou

    • @davidantolingonzalez4929
      @davidantolingonzalez4929 12 дней назад

      It does allocate memory for the Span (two fields), but it does on the stack, not on the heap. Also, since it only stores an address of memory and an int, no copy of data is needed.
      The tight loop is achieved because T reference is basically a pointer so for enumerating the only thing it has to do is add "one" to the pointer times length, exactly the same as an array.

  • @dlandi
    @dlandi 13 дней назад

    Riffing off "Naming is hard":
    Spam
    Hmmm.

  • @mrqbboy
    @mrqbboy 14 дней назад

    I'm going to repeat myself, but thanks Scott and Stephen.

  • @davidmasterson883
    @davidmasterson883 15 дней назад

    I just love these videos!

  • @ivandrofly
    @ivandrofly 5 дней назад

    34:31 - Pause
    39:00 - utf8 syntax from c# 11

  • @nessitro
    @nessitro 15 дней назад

    I love this! Tanmirt!

  • @SahilDesai-sx3sn
    @SahilDesai-sx3sn 14 дней назад

    knowledge SPANNING multiple videos.

  • @dy0mber847
    @dy0mber847 15 дней назад

    Show must go on

  • @lolroflxd
    @lolroflxd 15 дней назад +1

    Awesome ❤

  • @YuriBez2023
    @YuriBez2023 13 дней назад +1

    @37:11 - Stephen's fingers were off-by-one there.

  • @Corvinaification
    @Corvinaification 15 дней назад

    Amazing!

  • @yonatan2608
    @yonatan2608 11 дней назад

    These kind of videos should be in 202 schools.

  • @StackOverflowMan
    @StackOverflowMan 22 часа назад

    "readonly ref struct" appears in C# 8, while Span appreared earlier in .net core 2, and than Span was just a struct.
    Would be interesting to see how it evolve.

  • @anm3037
    @anm3037 13 дней назад

    Any interface for all collections (Array, List, etc) that can be converted to Span

  • @jackkendall6420
    @jackkendall6420 14 дней назад

    rubbed my hands together and cackled when I saw this

  • @Aaron31056
    @Aaron31056 11 дней назад

    Amazing

  • @kamlezadeh
    @kamlezadeh 4 часа назад

    Can we have a video explaining ArrayPool and MemoryPool please?

  • @yonatan2608
    @yonatan2608 14 дней назад

    thank youuuu

  • @paulscarlett4346
    @paulscarlett4346 15 дней назад +2

    "Please - May I have more?"

  • @jr.BoarOfGold
    @jr.BoarOfGold 15 дней назад

    I leave my instant like

  • @imranhussain8700
    @imranhussain8700 9 дней назад

    Tell us in the comment what you like and what you don't like.
    There are five videos now and I am still figuring out what are don't like.
    is there anything in these videos that we don't like, I don't think so.

  • @user-od4ce8pe3u
    @user-od4ce8pe3u 14 дней назад

    Idea for next video: exception under the hood

  • @ivandrofly
    @ivandrofly 5 дней назад

    At the beginning of the video, while using Rider and I'm like it's still hard to see the IL code in Visual Studio 😆😆

  • @robl39
    @robl39 13 дней назад

    Can you guys please deep dive the csc or the CLR?

  • @isaacayodejii
    @isaacayodejii 14 дней назад

    too gooood!

  • @kishananem
    @kishananem 14 дней назад

    Hello Scott/ Stephen
    Please do videos about algorithms used in framework.
    Please like comments who interested in this. They may do video.

  • @Cymricus
    @Cymricus 15 дней назад

    the people in chat being negative about copilot are gonna get behind if they don’t use the very powerful tools at our disposal.
    you really don’t want to be behind in a world with generative AI.

  • @davidelizalde3844
    @davidelizalde3844 15 дней назад

    Nice Invensible t-shirt

  • @dsellers
    @dsellers 13 дней назад

    👏

  • @MladenMihajlovic
    @MladenMihajlovic 15 дней назад +2

    You should really put "deep dive" in all the titles - much easier to find.

    • @shanselman
      @shanselman 15 дней назад +1

      fair...there's a playlist also

    • @MladenMihajlovic
      @MladenMihajlovic 14 дней назад +1

      @@shanselman Oh cool didn't know that. Favoritttettteeteed ;-) Playlists don't seem to come up when searching youtube sadly.

  • @__angle
    @__angle 13 дней назад

    🥰

  • @dskim2459
    @dskim2459 14 дней назад

    why dooes audio quality from .net never improve? please give them a good mic

  • @richmenaft
    @richmenaft 12 дней назад

    Please, do this series in dark mode...

  • @skarcade
    @skarcade 13 дней назад

    How many times was he told to zoom in during this video? 🔍😂

  • @zumalifeguard3493
    @zumalifeguard3493 13 дней назад

    It's kinda freaking me out honestly that Scott doesn't know arrays in C# are always contiguous. I know he's a very good developer. Just surprised I guess. Arrays have to be contiguous or couldn't effectively rely on locality of references. That's the big reason why std::vector is now recommended as the primary algorithm in C++, instead of things like linked-lists, etc., because in modern architecture, it's actually faster to work with contiguous arrays for a lot of things that previously used to be not be option -- all because of modern hardware.

  • @yufgyug3735
    @yufgyug3735 15 дней назад

    damn my only wish is to be as smart as these guys are

  • @tedchirvasiu
    @tedchirvasiu 9 дней назад

    C##

  • @Grimlock1979
    @Grimlock1979 15 дней назад +2

    Funny how he doesn't start talking about spans until half way through the video.

  • @LasseVagstherKarlsen
    @LasseVagstherKarlsen 15 дней назад

    Weeeeeeeeeee!

  • @h.jpouya4715
    @h.jpouya4715 15 дней назад +2

    great video. but is it possible to use dark mode for next episodes? like sharplab @4:32

  • @Kitulous
    @Kitulous 15 дней назад

    where's the dude that said that span was basically a reference to someone or whatever they said? look, an entire hour about spans!