DistIL
NetFabric.Hyperlinq
DistIL | NetFabric.Hyperlinq | |
---|---|---|
4 | 4 | |
108 | 860 | |
- | 0.2% | |
8.5 | 0.0 | |
8 days ago | 3 months ago | |
C# | C# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
DistIL
-
Classes vs. Structs in .NET. How not to teach about performance
How is that relevant to the vast majority of the code targeted by LINQ?
The niche scenario you have outlined is partially covered by a recent System.Numerics.Tensors package update (even though I believe it would have been best if there was a community-maintained package with comparable quality that can be decoupled from .NET release cycle and trade-off support/compat guarantees in favour of more aggressive improvements in the future).
The goal of LINQ itself is to offer optimal codepaths when it can within the constraints of the current design (naturally, you could improve it significantly if not for backwards compatibility with the previous 15 or so years of .NET codebases). The argument that it's not good because it's not the tool to do BLAS is just nonsensical.
There is, however, an IL optimizer that can further vectorize certain common patterns and rewrite LINQ calls into open-coded loops: https://github.com/dubiousconst282/DistIL
-
DistIL: Experimental optimizer and intermediate representation for .NET IL
Repo: https://github.com/dubiousconst282/DistIL
- DistIL: An experimental optimizer and compiler IR for .NET CIL
-
What's the benefit of local functions?
The lifetime problem should not be that complicated, because the class/lambda allocation is contained entirely within the method. There's an open issue on the runtime repo about object stack allocation that would on paper alleviate some of these issues, but it's quite stagnated. In my toy optimizer, I made a buggy pattern matching transform for "concretizing" lambdas invocations using very little code, but implementing something like this in the JIT can be quite challenging, based on my limited experience.
NetFabric.Hyperlinq
-
Classes vs. Structs in .NET. How not to teach about performance
> AVX instructions, which is implemented for quite a few LINQ methods
Are you sure? Any examples of such methods? And does AVX actually helps?
I don’t think that’s possible because IMO AVX and other SIMD can only help for dense inputs. The C# type is ReadOnlySpan, however ReadOnlySpan doesn’t implement IEnumerable and therefore incompatible with LINQ.
There’s even an alternative LINQ to workaround https://github.com/NetFabric/NetFabric.Hyperlinq but that thing is a third-party library most people aren’t using.
- Like Regular LINQ, but Faster and Without Allocations: Is It Possible?
-
700,000 lines of code, 20 years, and one developer: How Dwarf Fortress is built
I know it C# it doesn't have to make heap allocations, here's a Linq-clone that mostly eliminates them: https://github.com/NetFabric/NetFabric.Hyperlinq
-
Array iteration performance in C# — Branching and Parallelization
I'm the developer of one of the libraries and you may find in the benchmarks that it performs better than most others.
What are some alternatives?
mongo-csharp-analyzer - The MongoDB Analyzer is a free tool that helps you understand how your code translates into the MongoDB Query API.
MoreLINQ - Extensions to LINQ to Objects
.NET Runtime - .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
ksqlDB.RestApi.Client-DotNet - ksqlDb.RestApi.Client is a C# LINQ-enabled client API for issuing and consuming ksqlDB push and pull queries and executing statements.
LinqBenchmarks - Benchmarking LINQ and alternative implementations
StructLinq - Implementation in C# of LINQ concept with struct
MicroBenchmarksDotNet - C# Benchmarks for a better understanding of performance cost
CIDLib - The CIDLib general purpose C++ development environment
CQC - CQC (Charmed Quark Controller) a commercial grade, full featured, software based automation system. CQC is built on our CIDLib C++ development system, which is also available here on GitHub.
MoreAsyncLINQ - Additional async LINQ to objects operators for IAsyncEnumerable<T>
ShopifySharp - ShopifySharp is a .NET library that helps developers easily authenticate with and manage Shopify stores.
LinqAF - Low allocation re-implementation of LINQ-to-Objects