КОМЕНТАРІ •

  • @KvapuJanjalia
    @KvapuJanjalia 6 днів тому +1

    32:55 If I'm not mistaken, that optimization works only for bytes because of unknown endianness of target system where code is going to run. If span element is larger than a byte, a method stub is generated that creates an array instance at runtime and that read-only span points to it. No optimization.

  • @perdonomai8060
    @perdonomai8060 2 місяці тому +9

    Thanks! Switching from default UTF-16 C# string to UTF-8 will be the best C# performance improvement (including all string libraries)!

  • @sigma_z
    @sigma_z 2 місяці тому +1

    Awesome presentation. I knew some of these concepts already, but the presentation really drives it home!

  • @ilia__k
    @ilia__k 2 місяці тому +11

    It is almost always possible to avoid while(true) if () break;, replacing it with while (await src.ReadAsync() is {pattern} piece) { handle(piece);}

  • @OscarAgreda
    @OscarAgreda Місяць тому +1

    Thank you for making this topic accessible! I appreciate the deep dive into optimizing .NET code, particularly around Span and System.IO.Pipelines. I’m curious about your thoughts on balancing these high-performance techniques with maintaining readability, especially in large teams. Do you think the complexity introduced by these optimizations is justified in most production environments, or should they be reserved for specific high-performance use cases?

    • @Chiramisudo
      @Chiramisudo Місяць тому

      Absolutely the latter!! Readability translates to maintainability, and that almost always trumps the performance gains, but that highly depends on the use case. There are certainly times when that performance is critical such as virtual real time processes (in most cases, when real physical devices and hardware are involved): e.g. self driving cars, rocket launch control systems, surgery robots, high speed manufacturing lines, etc.

  • @NoName-1337
    @NoName-1337 2 місяці тому +2

    Is the code somewhere available? Would be happy, to read slowly through the whole code, to understand everything.
    EDIT: found. it will be mentioned in the end of the first minute of the video.

  • @jianye3259
    @jianye3259 Місяць тому

    Awesome talk!

  • @AlexanderMalyshkin-rg9dh
    @AlexanderMalyshkin-rg9dh 2 місяці тому

    Thank you Steve!

  • @gawiga
    @gawiga 2 місяці тому +2

    It's lovely to see your daughter agreeing with you at the end of the presentation, but wait until she turns 15 to throw it in your face that you should have used RUST from the beginning. 😂
    JK, great presentation, valuable knowledge. Thanks.

    • @Chiramisudo
      @Chiramisudo Місяць тому +2

      Bruh! Why is everyone on the Rust bandwagon? It has its uses but is NOT the be-all-end-all, and surely not a replacement for C#, which is an incredible language.

  • @generalyoutubewatching5286
    @generalyoutubewatching5286 2 місяці тому +3

    High performance C# code is an oxymoron. C++ and Rust FTW!

    • @DavidSmith-ef4eh
      @DavidSmith-ef4eh Місяць тому +6

      sure, rust is great. if you have lots and lots of time... time to wait for builds. time to learn it. tme to debug the errors. time to understand the complex data annotations..
      but still, I was wondering if he could 've done that csv parser in rust. like proxy pass that part of the app to a rust microservice that does only that..

  • @parko1965
    @parko1965 2 місяці тому +3

    Turbocharged code has got to be written in Java. Thumbs if you agree or disagree