Hacker News new | ask | show | jobs
by simonask 43 days ago
I’m aware. I would consider the fact that LINQ has caveats a failure of language design - it’s so convenient, but you just can’t use it for performance-sensitive stuff.

Meanwhile, iterators in Rust frequently outperform manual loops.

1 comments

ZLinq exists: https://github.com/Cysharp/ZLinq

    > Zero allocation LINQ with LINQ to Span, LINQ to SIMD, and LINQ to Tree (FileSystem, JSON, GameObject, etc.) for all .NET platforms and Unity, Godot.
Yup, I’m a happy user of it. Writing generic code with these enumerators is extremely verbose, because the language lacks associated types.