3 ms·
I see, thanks. Still, x1000 performance improvement is called a bug fix.
by EVa5I7bHFq9mnYK 2y ago
I see, thanks. Still, x1000 performance improvement is called a bug fix.
- neonsunset 2y agoI encourage you to read through this section: https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-9/#linq https://devblogs.microsoft.com/dotnet/performance-improvemen... and go through the pull requests that it references. The Nx elements figure is a speedup you would expect if you introduce a shortcut to any algorithm that can bypass doing full iteration, and >100x speed-up is what you would expect from going from interface dispatch per element (even if devirtualized behind a guard) to a bespoke vectorized implementation. Even if you happen to have irrational dislike of .NET, this is still useful learning material and perfectly applies to other languages that expose similar functionality (provided they have sufficiently good type system and generics).
- EVa5I7bHFq9mnYK 2y agoAn algorithm that performs a full iteration where a single lookup is sufficient, is a very bad algorithm. An iterator implementation that introduces 100x overhead is a very bad implementation. C++ has types and generics and pipes and is pretty efficient.
- neonsunset 2y agoC++ is absolutely terrible at this, either UX or performance (or sometimes both), and it's not even close ;)