Performance Battle - LINQ Chunk vs MoreLINQ Batch!
Вставка
- Опубліковано 15 вер 2024
- You asked for it -- I delivered.
What's the big difference between MoreLINQ's Batch method and LINQ's Chunk method?
On the surface: Absolutely nothing.
But can we go... deeper? What will we find when we compare benchmarks for both of these things?
You might be surprised! Now I am not suggesting you use one or the other necessarily, but I'd like to show you the tools for you to be able to decide for yourself.
----
🚀 Get Tools and Skills for .NET 8 here: 🚀
amzn.to/4g5WrUq
----
🔑 Membership & Subscriptions:
- 📨 Weekly Newsletter: weekly.devlead...
- 🏘️ Private Discord Community: / discord
- 📽️ UA-cam Membership: / @devleader
🧠 Courses:
- All Courses: www.devleader....
- Getting Started with C#: dometrain.com/...
- Deep dive C#: dometrain.com/...
- C# Zero to Hero BUNDLE: dometrain.com/...
- Reflection in .NET: dometrain.com/...
- Refactoring For C# Devs: dometrain.com/...
- [FREE] Intro to Software Development: • [FREE MINI COURSE] - I...
🗣️ Social Media & Links:
- All My Links: linktr.ee/devl...
- Blog: www.devleader.ca/
- TikTok: / devleader
- LinkedIn: / nickcosentino
- Threads: threads.net/@d...
- Twitter: / devleaderca
- Facebook: / devleaderca
- Instagram: / dev.leader
- GitHub: github.com/nco...
- Twitch: / devleaderca
- UA-cam: / @devleader
❤️ Affiliations & Products/Services That I Love:
- VPS hosting from RackNerd: my.racknerd.co...
- VPS hosting from Contabo: www.jdoqocy.co...
- My newsletter platform ConverKit: convertkit.com...
- My newsletter referral system SparkLoop: dash.sparkloop...
- My AI shorts helper Opus Clip: opus.pro/?via=...
- I try to help answer questions at Quora: www.quora.com/...
- My favorite computer parts store Newegg: click.linksyne...
- My favorite supplement store Bulk Supplements: glnk.io/63qn/d...
----
#dotnet #csharp #linq #morelinq
🚀 Get Tools and Skills for .NET 8 here: 🚀
amzn.to/4g5WrUq
Hi Nick, I'm glad to see this comparison as we discussed earlier.
I am surprised by the result, showing that MoreLinq performed better than the built-in chunk.
I feel things are just starting to get interesting regarding this topic.
Especially if you bring the 2 "big players" into the picture. ArraySegment and Span with Slice (even if both need 1-2 extra lines to make it work).
It would show kind of an evolution in .NET and how things have improved over the years.
I feel like we are spoiled with all these great tools available to us
I thought it was surprising as well! I do think there are going to be a lot of advancements in this -- iterators are powerful but we got all of these other perf improvements for arrays, spans, etc...
We'll see!
Thanks for this comparison, I've been awaiting it too. I wonder how a custom implementation with Memory and/or Span would compete. Hadn't yet the time to do so.
You're very welcome! Yeah, could be very interesting. I haven't dug into code for either of these implementations -- I have a lot of other things I am focusing on but I think there'd be value in digging a bit deeper!