Batch Collections With MoreLINQ - How To Guide And Benchmarks

Поділитися
Вставка
  • Опубліковано 16 лис 2024

КОМЕНТАРІ • 12

  • @DevLeader
    @DevLeader  2 місяці тому

    ** Corrected benchmarks:
    ua-cam.com/video/t-qWtP_TcTc/v-deo.html

  • @19balazs86
    @19balazs86 3 місяці тому +1

    It would be interesting to compare the MoreLINQ Batch method with the built-in System.Linq.Enumerable.Chunk.
    Plus another one for manual batching is 'yield return new ArraySegment(sourceArray, offset, batchCount)

    • @DevLeader
      @DevLeader  3 місяці тому

      @@19balazs86 I can do that 🙂

    • @19balazs86
      @19balazs86 3 місяці тому +1

      ​@@DevLeader Great, I love these benchmark comparisons. You can learn a lot about writing better code by understanding small details

    • @DevLeader
      @DevLeader  3 місяці тому +1

      @@19balazs86 glad to hear 😁 thanks for the feedback!

  • @martinsmifff
    @martinsmifff 3 місяці тому +1

    At 12:10 in the video you show the MoreLinq batch test, but looking at the video it appears you have a fixed size of 100 for the batch size.

    • @DevLeader
      @DevLeader  3 місяці тому

      Ugh you're TOTALLY right. Let me re-up this in the next video. Thanks for your callout.
      I'll be extending the benchmarks based on some other comments.

    • @DevLeader
      @DevLeader  3 місяці тому

      Tomorrow's video should address this error. Already sent to the editor.
      Huge thanks for pointing this out!

  • @DevLeader
    @DevLeader  3 місяці тому

    💡 Learn how to program in C#:
    - dometrain.com/course/getting-started-csharp?affcode=1115529_nl-teyzg
    🧠Deep dive on C#:
    - dometrain.com/course/deep-dive-csharp?affcode=1115529_nl-teyzg
    🎁Zero to Hero C# Bundle:
    - dometrain.com/bundle/from-zero-to-hero-csharp/?affcode=1115529_nl-teyzg
    💪 Skill up your refactoring:
    - dometrain.com/course/from-zero-to-hero-refactoring-for-csharp-developers?affcode=1115529_nl-teyzg
    ✉ Subscribe to my free software engineering newsletter:
    - subscribe.devleader.ca

  • @benomine
    @benomine 3 місяці тому

    Why use the method Batch when you have Chunk available ?

    • @DevLeader
      @DevLeader  3 місяці тому

      @@benomine likely because MoreLINQ predates this method being available.
      Someone else asked for metrics comparing to chunk, so we'll see in another video if there's any difference 🤷‍♂️

    • @benomine
      @benomine 3 місяці тому

      @@DevLeader Thanks for the response! It's true Chunk is way younger than MoreLINQ. Love your videos btw.