LINQ's INSANE Improvements in .NET 9

Поделиться
HTML-код
  • Опубликовано: 14 ноя 2024

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

  • @FICHEKK
    @FICHEKK Месяц назад +147

    Before watching the video on how they did it: SPAN!!!

    • @shahkaleem6601
      @shahkaleem6601 Месяц назад +4

      Exactly what I am thinking

    • @PereViader
      @PereViader Месяц назад +2

      SPAN!

    • @daniellundqvist5012
      @daniellundqvist5012 Месяц назад +13

      Span, span, span, bacon, eggs and span.

    • @p00laris
      @p00laris Месяц назад

      Let’s go!

    • @Hewtoob
      @Hewtoob Месяц назад

      @@daniellundqvist5012 I was just thinking about that Monty Python skit too. haha

  • @marceldeger7487
    @marceldeger7487 Месяц назад +101

    Im glad that they SPANd time on improving linq

    • @Briezar
      @Briezar Месяц назад +1

      please excuse yourself and refrain from entering any party

  • @evanboltsis
    @evanboltsis Месяц назад +314

    A special team was formed in Microsoft to work on these improvements named LINQin Park. (sorry not sorry for this joke :D)

    • @tudogeo7061
      @tudogeo7061 Месяц назад +48

      They better keep a close eye on the team lead...

    • @chrismaskinis
      @chrismaskinis Месяц назад +4

      Why?? 😂

    • @gahshunker
      @gahshunker Месяц назад +53

      @@tudogeo7061 they shouldn't really do that, cause in the end..... it doesn't really matter

    • @nunograca2779
      @nunograca2779 Месяц назад +13

      They are always One Step Closer to the perfection (sorry not sorry for this joke :D)

    • @epiphaner
      @epiphaner Месяц назад +8

      Honestly, Linkin Park's "In the End" to me always evoked the image of a tired dev screaming at his uncooperative code base.
      At least LINQin Park brought salvation through .NET 9

  • @zheniachubarov3384
    @zheniachubarov3384 Месяц назад +48

    Please do the video about Unsafe

  • @TheAstroguypasa
    @TheAstroguypasa Месяц назад +5

    Always happy to dev in .NET. The ecosystem is improving by the day!

  • @jewersp
    @jewersp Месяц назад +4

    Span simply is the game changer in .NET. So elegant.

  • @wtflolomg
    @wtflolomg Месяц назад +104

    Some guy on RUclips recently told me that .NET 9 was just "meh" and questioned the entire update. You should school that guy with your Code Cop series.

    • @TehGM
      @TehGM Месяц назад +4

      I mean, new features wise, it is meh. However I am still excited, and have been for every .NET version for past few years - and that's specifically cause of the performance improvements they make. For me it just means my stuff runs faster and better without me having to do anything, so I'll take that happily.
      Still wish there were more actual features in .NET 9 though - but I am still updating my main projects as soon as it hits, even if for these free gains alone.

  • @daymaker_trading
    @daymaker_trading День назад

    Insane! Wow, thanks for this detailed overview!

  • @mohamedeffat54
    @mohamedeffat54 Месяц назад +16

    Please make an updated deep dive on spans and marshaling

  • @petrusion2827
    @petrusion2827 Месяц назад +18

    While this is a overall a positive thing, I'm worried about the fact that these seem like hardcoded optimizations. If you have a custom enumerable adapter implemented via yield return, and you put in between two LINQ adapters from the standard library (like list.CustomAdapter1().Skip(5).CustomAdapter2().take(5)), you won't get these performance benefits, right? Not to mention AFAIK you're still paying the price of dynamic dispatch for every call to your Func lambdas.
    I'm more a fan of adapters in language like C++ or Rust, where the optimizations are done by the compiler itself by inlining all the lambdas and producing code equivalent to a for loop.

    • @SerhiiZhydel
      @SerhiiZhydel Месяц назад +3

      I think this type of optimization was chosen because C# runs on CLR, and it's not compiled to machine code directly. And there can be libs written using other languages and running in the same build. So .net team would have to edit compilers of each of these languages, leaving their scope of responsibility. Framework should remain a framework and not require changes of compilators, especially of many languages.

    • @petrusion2827
      @petrusion2827 Месяц назад

      @@SerhiiZhydel Oh yeah for sure. I probably wasn't being clear - I'm not trying to say .Net should do the same optimizations that gcc or rustc do. I was trying to say that even with these new linq optimizations it isn't hard to get into a situation where they all fly out the window and if the verdict a newbie gets from this is "linq is fast now" they'll have a hard time realising why it is "suddenly" slow in their usecase. Furthermore, my point is that even with these optimizations a for loop over a span is still going to be faster in C# AFAIK, so linq still can't be used in performance critical code.

    • @john_paul_r
      @john_paul_r Месяц назад

      depends on the type of optimization. For the Span ones, I'd say that's right, you're getting nothing. For the ones like "You don't need order the whole results set before processing First", sounds beneficial regardless.

  • @KonradGM
    @KonradGM Месяц назад +34

    so Unity annouced at United 2024 that vor version 6.1+ (or 6.1?) they will move from mono to CoreCLR. Hopefully this means all those improvements will be there too!

    • @omaromor3250
      @omaromor3250 Месяц назад

      According their statement it should be there.Man I'm just excited about Unity 6.1 ..Hope they deliver what they showed

    • @x3n689
      @x3n689 Месяц назад +14

      They were talking about "next generation" (Unity 7). The move won't happen in Unity 6 unfortunately

    • @PetrVejchoda
      @PetrVejchoda Месяц назад

      @@x3n689 Nooooooo!!!!!

    • @romancalderon
      @romancalderon Месяц назад +9

      Still a great move for them to make. Glad it’s now at least set on their roadmap. Zero memory allocation is huge, especially for game applications

    • @Dominik-K
      @Dominik-K Месяц назад

      I'm looking forward to those improvements a lot

  • @GIRARDINF
    @GIRARDINF Месяц назад

    Very interesting. I think this is a real good way to explain performance evolution. But something is missing.
    To be honest and exhaustive, we need to check the performance evolution from many analyses axes :
    - Dotnet framework version
    - ORM (EF, Daper, ...)
    - Storage kind (SQL Server, Oracle, MongoDb, Casandra, ...)
    Without this, it is really difficult to consider that only an evolution of the framework means x6 performance.

  • @loganyoung228
    @loganyoung228 Месяц назад +1

    I'm starting to understand the benefit of upgrading projects to newer framework versions.

  • @F1nalspace
    @F1nalspace Месяц назад +6

    Sounds good. We use linq a lot at work, so we will definitily benefit from switching to .NET 9, but it is unsure when we will switch from 8 to 9.
    Normally we only switch to LTS releases and as you all know, .NET 9 is not a LTS release.

    • @FraserMcLean81
      @FraserMcLean81 Месяц назад +1

      Never understood why LTS matters so much. .NET 9 is still supported for 18 months and then .NET 10 will come out.

    • @F1nalspace
      @F1nalspace Месяц назад

      @@FraserMcLean81 Its simple, if you work in a very large company, adapting libraries or software is expensive and/or time consuming. Also there may security risks involved. Therefore its common practice that middle to large companies only use libraries that are well tested, hardened and are used by many companies. In addition the libraries are heavily tested by the IT department against vulnerabilities. Such tests takes many months and it takes 1-2 years until software or libraries are approved by them.

    • @michaelmoreno6431
      @michaelmoreno6431 Месяц назад +2

      @@FraserMcLean81because it is hugely expensive to migrate the code, the dependencies, the buil, the install, the tests and when finally the product reaches your client devices, that version of .Net is already no longer supported... Those short term version are useless in a complex professional environment.

  • @diadetediotedio6918
    @diadetediotedio6918 Месяц назад +23

    These improvements are welcome. But I also would like if .NET focused a bit on doing actual compiler optimizations, like, many of the LINQ constructs can easily be converted into normal loops and have massive performance implications over needing to allocate enumerables.

    • @modernkennnern
      @modernkennnern Месяц назад +2

      They're doing a lot of those too. For example they've started supported stack-allocating classes in a few scenarios.

    • @diadetediotedio6918
      @diadetediotedio6918 Месяц назад

      @@modernkennnern
      They did? What, I thought it was not a thing that would happen any time soon, where did you saw this?

  • @casperhansen826
    @casperhansen826 Месяц назад

    Nice update, I usually never optimize my code as performance really isn't a problem any more, when I optimize it's the algorithm that I change

  • @mehdizeynalov1062
    @mehdizeynalov1062 Месяц назад

    hi Nick - so this video is all about IEnumerable and memory interface of LINQ. What about IQueryable and db operations, is there an improvement over there as well?

  • @JeffGraw
    @JeffGraw Месяц назад +4

    I've been anticipating this since forever ago. There was no good reason for LINQ to be as slow as it has been up until now.

  • @qj0n
    @qj0n Месяц назад

    I believe the replacing iterators with spans might actually change the behavior in some weird cases, mightn't it?
    Let's say your junior dev decide to modify the underlying list inside the select lambda. Currently, iterator will throw the exception describing that's a terrible idea. When using spans, it will work, but you won't know if the reallocation happened so you iterate through the current underlying span or the old one

  • @ghaf222
    @ghaf222 Месяц назад +1

    Unless I’m misunderstanding the video then congratulations on the newborn baby! I’ll keep an eye out for less frequent videos from an increasingly tired Nick.

  • @dariomrkonjic6812
    @dariomrkonjic6812 Месяц назад +5

    🗣️🗣️🔥🤝 Stephen Toub sign on my newborn baby

  • @xopabyteh
    @xopabyteh Месяц назад +2

    We're migrating to .NET 9 with this one 😎

    • @oussama7132
      @oussama7132 Месяц назад +1

      You mean net 6? -your company

  • @CharlesBurnsPrime
    @CharlesBurnsPrime Месяц назад +2

    Yes, please make an Unsafe.* video.

  • @yaghiyahbrenner8902
    @yaghiyahbrenner8902 Месяц назад

    Looks good nick.

  • @barionlp
    @barionlp Месяц назад +15

    Span, what else could it be

    • @CarlintVeld
      @CarlintVeld Месяц назад +3

      Iterator consolidation 🤯

  • @Bitstream
    @Bitstream Месяц назад

    Impressive... Most impressive! 😮

  • @kidmosey
    @kidmosey Месяц назад +1

    This is why I strongly oppose optimizations against language features. Keep your code short/simple and leave it to the compiler/language to make it faster.

  • @Boris-B.
    @Boris-B. Месяц назад

    This looks a lot like what RDBMSs are doing when planning query execution. Only they use heuristics and statistics over the source data while this seems more universal.

  • @annazann7236
    @annazann7236 Месяц назад +4

    Brilliant. We had to refactor some methods back in dot net 7, because linq was extremely slow in those situations. Love this one ❤️

  • @BillyBraga
    @BillyBraga Месяц назад +1

    Does the first improvement apply to lists of objects? Who has lists of numbers on their code?

  • @JustaFrogger
    @JustaFrogger Месяц назад +63

    Hate people hating LINQ, it's amazing

    • @tedchirvasiu
      @tedchirvasiu Месяц назад +4

      Who hates LINQ?

    • @MahmoudSaed98
      @MahmoudSaed98 Месяц назад

      @@tedchirvasiu
      stupid people

    • @fusedqyou
      @fusedqyou Месяц назад +4

      @@tedchirvasiu There will always be people calling out LINQ for being slower or worse in some way, because that's how people on the internet work

    • @akirakosaintjust
      @akirakosaintjust Месяц назад +6

      @@tedchirvasiu query syntax LINQ is very weird imo, lambda syntax LINQ is great

    • @keyser456
      @keyser456 Месяц назад

      @@akirakosaintjust It (the expression syntax) is weird, until it's not. In 98% of scenarios the lambda syntax is appropriate, is easier to use, and looks great. I have run into scenarios requiring joins that either weren't possible or were so hideously ugly trying to get the lambda syntax to work it wasn't worth it. If you ever do run into such a situation, don't fret. The expression syntax makes a lot of sense once you're forced to work with it a bit, and it becomes very powerful, albeit in a limited # of situations. You can start using it just as you'd use TSQL w/ joins, but on in-memory sets of data joining as necessary. Selecting from those joins only the data you need is a thing of beauty, like a skilled surgeon with a scalpel.

  • @alexanderpoplooukhin7448
    @alexanderpoplooukhin7448 Месяц назад

    Fantastic improvements from Microsoft. I like LINQ. Thank you Nick for this video.

  • @ZiplawDev
    @ZiplawDev Месяц назад

    a video on the Unsafe class would be awesome

  • @_iPilot
    @_iPilot Месяц назад

    Did Distinct and OrderBy get their piece of the cake?

  • @MZZenyl
    @MZZenyl Месяц назад

    This video really spanned my LINQ.

  • @hqcart1
    @hqcart1 2 дня назад

    Is there better performance for the normal code? ie. Where, firstordefault, select, groupBy? 99% of my code uses these

  • @killymxi
    @killymxi Месяц назад +1

    With postponed new features and coming performance improvements for existing features, feels like Microsoft could've changed their release cycle and called this an LTS release...

  • @SixOThree
    @SixOThree Месяц назад

    Serious question. What if the data is too large to convert to a span. Are there still performance improvements? I generally avoid spans because of this fear of running out of stack space. Is this a legit worry?

  • @Sergio_Loureiro
    @Sergio_Loureiro Месяц назад +6

    Questions:
    1. Did they do improvements also to the LINQ methods used inside real DB queries, like in `IQueryable` objects? It is a different species, given it is translated to SQL, or to technology which is behind it.
    2. Did they do also improvements to the non LINQ methods of collections?

  • @btogkas1
    @btogkas1 Месяц назад

    What kind of scorcery is this? Nice work

  • @PabloZaragoza
    @PabloZaragoza Месяц назад

    All very cool, still my codebase at work is .net framework 4.8 so..

  • @FandangoJepZ
    @FandangoJepZ Месяц назад

    There is so much crap error handling in LINQ that results from a type system where null as a type was an afterthought. Also the dynamic typing makes it worse. Good example is List.Count(), LINQ is smart enough to check if it implements ICountable but it still needs to do type checking at runtime

  • @nwlk9262
    @nwlk9262 Месяц назад

    some people says it's efficient to use normal loops instead of linq. Is that true??? Even loops are easier in some cases

  • @sergi0YT
    @sergi0YT Месяц назад

    SPAN SPAN SPAN! SPAAAAAN!

  • @CryShana
    @CryShana Месяц назад

    When in doubt, span

  • @DasBloch
    @DasBloch Месяц назад +4

    Does this mean we can use Any() on a list instead of Count() == 0 ?

    • @marceldeger7487
      @marceldeger7487 Месяц назад +3

      @DasBloch on a list you should use Count == instead of Count()

    • @paxcoder
      @paxcoder Месяц назад

      I haven't done C# for a long time. Can you explain your comment to me please?

    • @DasBloch
      @DasBloch Месяц назад

      @@paxcoder People have often used the any() extension on a list to see if it is not empty. If (mylist.Any()) (It reads nicely) But microsoft is giving warnings when you do it. You should use if(mylist.Count == 0) for performance reasons. I was wondering if these improvements made the any check okay to use

    • @marceldeger7487
      @marceldeger7487 Месяц назад +2

      @paxcoder A List implements IEnumerable, which gives it access to methods like Count() from LINQ. However, List also directly tracks its size with the Count property, since it's essentially a dynamically resized array.
      Because List knows its size internally, you can use the Count property to access the number of elements directly. While Count() works fine on a List, it’s not necessary in this case, as the property is faster due to avoiding a method call.
      You can use the Count() Method in case you want to count something specific with a predicate like Count(x => x > 50)
      So TL;DR: You don't need to use the Count() method when you can access the Count property directly 😁

    • @paxcoder
      @paxcoder Месяц назад

      @@marceldeger7487 I asked about DasBloch's comment. It's not apparent that these new optimizations have anything to do with Any() vs Count() == 0.
      Fun fact: Enumerable.Any without arguments already uses the internal count if available via TryGetNonEnumeratedCount. One should still probably use .Count if possible though, because TryGetNonEnumeratedCount does a runtime type test, as Linq methods tend to do (not sure why they don't have different implementations for different types instead?).

  • @Stefan-bp6ge
    @Stefan-bp6ge Месяц назад +3

    So, Stephen Toub really signed on your newborn baby?

  • @krccmsitp2884
    @krccmsitp2884 Месяц назад

    Effing great!

  • @Vosoo-e9r
    @Vosoo-e9r 26 дней назад

    Why they dont implement this in C++ directly

  • @nrgstudios612
    @nrgstudios612 Месяц назад

    Could you please provide the source code for the project?

  • @BartKemps
    @BartKemps Месяц назад +1

    And here I was thinking these optimizations were already in the first version of Linq. Okay, spans did not exist, but explicit implementations for arrays and lists did exist, right? ... right? ....

    • @Briezar
      @Briezar Месяц назад +1

      they did do type checks for interfaces like IList, but spans were not implemented. It was optimized, just not this fast.

    • @Crumbledore
      @Crumbledore Месяц назад +1

      Nope. The first version was extremely naive. It has seen optimizations since then under the hood but I don't believe it has ever had specialized implementations for backing arrays till now

  • @dukefleed9525
    @dukefleed9525 Месяц назад

    hello nick, can this potentially change the framework behavior in case or bad written code where two threads are accessing the same enumerable, one using these method with the new implementation and the other modifying the collection adding an element at the same time?
    old framework should throw an exception as they are using the enumerator to enumerate the collection inside the linq method, do the new linq throws anyway ? or which is the behavior now?

    • @ryan-heath
      @ryan-heath Месяц назад

      I don’t believe they can change these semantics. If the underlying structure changes they must keep throwing an exception. This is designed behavior.

  • @I-PixALbI4-I
    @I-PixALbI4-I Месяц назад +2

    Slow code? Did you try use Span?)

  • @kevman2296
    @kevman2296 Месяц назад +4

    I love LINQ and I love how LINQ gets better with every dotnet version. That makes C# so much superior to other programming languages

  • @AmateurSpecialist
    @AmateurSpecialist Месяц назад +1

    1:40 I hope he gets the message.

  • @regestea
    @regestea Месяц назад

    can you introduce a library for performance testing in integration test and unit test ?

  • @MahmoudSaed98
    @MahmoudSaed98 Месяц назад +2

    Always Span

  • @GGGStalker
    @GGGStalker Месяц назад

    I think they should fix bug before improvement, you can't be perfect with known bugs which are even not exists in typescript even java,
    Like null return in generics when instead of using nullable ( this is almost a hack - lol)

  • @Rein______
    @Rein______ Месяц назад

    SelectAsync still missing

  • @Ilix42
    @Ilix42 Месяц назад

    While I’m sure it’s not Microsoft’s concern, changes like this are great for those of us in gaming.

  • @EugeneS88-RU
    @EugeneS88-RU Месяц назад

    I hope this features will go to unity3d scripting backend

  • @Daniel-hb4nh
    @Daniel-hb4nh Месяц назад

    I am wondering if Stephen Toub responded positively to your sincere request?
    UPD: Yes, please, make a video about the Unsafe

  • @DiegoMenta
    @DiegoMenta Месяц назад

    Spans!

  • @sunnyyssh
    @sunnyyssh Месяц назад +3

    Stephen Toub mentioned

  • @uraymeiviar
    @uraymeiviar Месяц назад

    it still have garbage collector

  • @redice8928
    @redice8928 Месяц назад

    one time they return pointers like in golang

  • @user-dc9zo7ek5j
    @user-dc9zo7ek5j Месяц назад

    Their solution looks like a hack to me. When I think of optimization I think of compiler optimization or optimization of the design so that its simpler and performant, not rewriting every year the same code, but only for ints or bools.

  • @RootAndroidAndEthicalHacker
    @RootAndroidAndEthicalHacker Месяц назад

    can you provide this code for free its just benchmarks

  • @Duckstalker1340
    @Duckstalker1340 Месяц назад

    What IDE is this? Does not look like vscode or full fledge Visual Studio! (Asking for a friend)

    • @GabrielBider
      @GabrielBider Месяц назад

      He's using Jetbrains Rider

    • @vyrp
      @vyrp Месяц назад +1

      Rider

    • @AresifyGfx
      @AresifyGfx Месяц назад

      @@vyrp I hardly know her

  • @xup6y3ru04
    @xup6y3ru04 Месяц назад

    That's great! So much performance improvement.

  • @jasongoh2046
    @jasongoh2046 Месяц назад

    It still doesn't convince me to switch from raw SQL to LINQ.

    • @pilotboba
      @pilotboba Месяц назад

      That's a horse of a different color.
      That said, EF cores SQL is extremely optimized for most common use cases. Also, your SQL won't improve itself from version to version. :)

    • @jasongoh2046
      @jasongoh2046 Месяц назад

      ​@@pilotboba Yes, I can see the improvements and benefits from the hard work of the .NET team. i m happy to see new tools can improve my life. However, I rarely need to tweak my SQL scripts since they were optimized from day 1. For me, code that 'improves itself' isn’t always ideal - my SQL scripts have remained unchanged(performance wise) over the last 10 years, even through multiple .NET upgrades, with no surprises, and works great. As tables grow in size(~10M) and complexity, I often have to switch from LINQ to raw SQL to maintain performance (Past experiences, 6 years back). i think it is good to try in small scale projects.

    • @jasongoh2046
      @jasongoh2046 Месяц назад +1

      @@pilotboba Yes, I can see the improvements and benefits from the hard work of the .NET team. However, I rarely need to tweak my SQL scripts since they were optimized from day 1. For me, code that 'improves itself' isn’t always ideal - my SQL has remained unchanged(Performance) over the last 10 years, even through multiple .NET upgrades, with no surprises, works great. As tables grow in size and complexity, I often have to switch from LINQ to raw SQL to maintain performance(Past experience, 6 years back). And, there's no harm in trying LINQ again for smaller-scale projects in future.

    • @vyrp
      @vyrp Месяц назад

      @jasongoh2046 : nothing that Nick mentioned in this video is applicable to Linq-to-SQL. He was talking about in-memory Linq.

    • @pilotboba
      @pilotboba Месяц назад

      @@jasongoh2046 Fair, whatever works for you. Also keep in mind that stuff shown in this video is about linq of inmemory data not IQueryable stuff.

  • @carldebilly
    @carldebilly Месяц назад

    Maybe it's me, but I always understand "Hello everybody, I'm naked" at the beginning of the video...

  • @JerryNixon
    @JerryNixon Месяц назад

    Other languages are getting further and further behind.

  • @neonmidnight6264
    @neonmidnight6264 Месяц назад +1

    Hey, I contributed to some of these!

  • @bhanuchhabra7634
    @bhanuchhabra7634 Месяц назад

    How did Microsoft improved the times:
    "They handwritten the optimization logic 😅"
    ... " They improved the logic by sweat and tears of programmers "

  • @bithon5242
    @bithon5242 Месяц назад

    Why are pronouncing link queue as link?

    • @nickchapsas
      @nickchapsas  Месяц назад

      Because it’s pronounced link

    • @GabrielBider
      @GabrielBider Месяц назад

      @@nickchapsas Link-Q, that was a first 😆

    • @bithon5242
      @bithon5242 Месяц назад

      @@nickchapsas ah so queue is silent. makes sense

  • @frankyboy4409
    @frankyboy4409 Месяц назад

    someone re-record that monty python spam-sketch to span please

  • @ihorleleka
    @ihorleleka Месяц назад +1

    Without watching the video I could tell it's SPAN 😂

  • @DevDunkStudio
    @DevDunkStudio Месяц назад +1

    And don't forget that regular lists and arrays have their own .length/.count methods that always will outperform LINQ.
    Especially with Unity development

  • @zheniachubarov3384
    @zheniachubarov3384 Месяц назад

    Where can I read or what should I watch to get more familiar with such low-level C# features?

  • @Ry4nWTF
    @Ry4nWTF Месяц назад +3

    hopefully all five of my internal enterprise app users will notice the perf gains

  • @iulian9796
    @iulian9796 Месяц назад

    😶‍🌫Its not LTS 😜

  • @zagoskintoto
    @zagoskintoto Месяц назад

    But as some reddit user's manager said, we don't use LINQ here!

    • @pilotboba
      @pilotboba Месяц назад +1

      Reasons not to use LINQ.
      1. You get paid per LOC written.
      2. See 1.
      3. See 1
      4. See 1
      (I
      get
      paid
      per
      line
      in
      youtube
      comments.
      )

  • @LlamaNL
    @LlamaNL Месяц назад +8

    ONLY SPANS

  • @TheOmokage
    @TheOmokage Месяц назад

    Can you make video "what is marshaling" ))

  • @semaphore_pk
    @semaphore_pk Месяц назад

    "Only Spans"

  • @tosunabi1664
    @tosunabi1664 Месяц назад

    Finally no more optimizing loops, .NET9 does it all.

  • @gahshunker
    @gahshunker Месяц назад +1

    it's again.... the SPAN..... or as they say Spaghetti Programs Are Normal

  • @Myself0094
    @Myself0094 Месяц назад

    Oh, Only Spans once again

  • @sigtermnull
    @sigtermnull Месяц назад +1

    It's a pity they don't invest as much in reducing memory consumption

  • @delyaniliev6020
    @delyaniliev6020 Месяц назад +1

    So you basically got some code from another guy's blog and you put it here, as if you created some of that benchmark or what? Why not reference the original post

  • @Matt23488
    @Matt23488 Месяц назад +2

    Not being allowed to use LINQ for performance is wild to me. Seems like if that's a requirement, C# was the wrong language choice to begin with.

    • @Alexander.Kravchenko
      @Alexander.Kravchenko Месяц назад +2

      No. One obvious example is Unity

    • @diadetediotedio6918
      @diadetediotedio6918 Месяц назад +4

      No? Who said C# should be slow in the first place?
      If this was the mentality behind C#, it would not had value types natively nor reified generics, yet they exist and they provide many performance improvements over the Java model for example. The same goes for Spans and other high performance types (and even pointers, in extreme cases), and the same goes into the constant efforts by the .NET team to improve the performance of the language.
      This kind of point is just very bizarre to me.

    • @Matt23488
      @Matt23488 Месяц назад

      @@diadetediotedio6918 Optimizing .NET is a relatively recent thing. Eric Lippert, formerly on the C# design team, had written several blog posts over his tenure there about premature optimization being a bad idea. They simply weren't concerned with blazing performance until recently. I've been doing this for quite awhile now, and C# was traditionally considered a slow language. Things are different now of course, but we're talking about the past here.

    • @stdprocedure
      @stdprocedure Месяц назад

      @@diadetediotedio6918 I think that's why he said "is wild to me"

  • @sebdoucet_fr
    @sebdoucet_fr Месяц назад +1

    So, you are failling people at interview not because they are not good... just because they don't know your exact use case... nice fail from you, if they are good at coding, they can learn fast... Sure I'll never want to work for people like this.

    • @nickchapsas
      @nickchapsas  Месяц назад +9

      You can teach people how to code but you can't teach them how to behave, especially after 30. Rejecting people based on character because said character can't gel with the existing teams culture is not only very common, but a must if you want a good team.

    • @Crumbledore
      @Crumbledore Месяц назад +5

      Speaking from experience, I'd rather have a mediocre developer with good soft skills over skilled programmers who don't. It really can't be overstated how destructive people who don't know how to behave in the team can be for the entire team. Both in productivity and development enjoyment/team atmosphere

    • @Snickerv12
      @Snickerv12 Месяц назад +2

      @@nickchapsasdon’t you have a course on passing the behavioral parts though? In that what you were just selling in this video? So if these peoples behaviors can’t change like you said, they are lying and just getting a pass to get the job. Then they go back to their crappy old behaviors. So what you’re selling..is not so great for society. Weird.

    • @nickchapsas
      @nickchapsas  Месяц назад

      @@Snickerv12 You can't change your behavior but you can still hack your way into passing the behavioral interview. They are two very different things. I've worked with absolute dickhead developers that new how to bullshit the behavioral interview and say what the interviewer wanted to hear.

    • @keyser456
      @keyser456 Месяц назад

      "Good fit" is a thing, like it or not. If you're going to be disruptive and/or disrespectful to the other devs and/or the team/company culture then it doesn't matter how good your technical skills are or how vast your knowledge is. You're still not a good fit. (period)

  • @nasunorahl
    @nasunorahl Месяц назад

    Hard pass.

  • @jan.kowalski
    @jan.kowalski Месяц назад

    Bunch of awful, unreadable, mind eating code.

  • @bhanuchhabra7634
    @bhanuchhabra7634 Месяц назад

    How did Microsoft improved the times:
    "They handwritten the optimization logic 😅"
    ... " They improved the logic by sweat and tears of programmers "