"ZLinq", a Zero-Allocation LINQ Library for .NET
a year ago
- #LINQ
- #.NET
- #Performance
- ZLinq is a zero-allocation LINQ library for .NET, leveraging structs and generics to eliminate allocations.
- It includes extensions like LINQ to Span, LINQ to SIMD, and LINQ to Tree (FileSystem, JSON, GameObject, etc.).
- ZLinq supports multiple platforms, including .NET Standard 2.0, Unity, and Godot, and has exceeded 2000 GitHub stars.
- The library achieves 100% coverage of all methods and overloads in .NET 10, ensuring 99% behavior compatibility.
- ZLinq implements optimizations beyond allocation reduction, such as SIMD support, to outperform in most scenarios.
- The library's architecture is based on ValueEnumerable<TEnumerator, T> and IValueEnumerator<T>, reducing method calls and struct size.
- ZLinq provides LINQ to Tree for tree structures, with standard implementations for FileSystem, JSON, Unity's GameObject, and Godot's Node.
- The library avoids commercialization, focusing on maintenance and innovation despite the mental burden on the maintainer.
- ZLinq's development was influenced by feedback and contributions from the community, ensuring compatibility and performance improvements.