I’ve just release a FOS rewrite of LINQ up onto git. I hope to keep this as a community driven project, and perhaps expand it into other aspects of .Net that are either slow due to GC, or flat out do not work due to AOT/IL2CPP.
Currently most of the LINQ feature set is implemented with significant performance improvements across the board. There are a couple of areas I am looking to improve upon in my next iteration, such as removing the last LINQ dependency with the group-by extension method.
Anyway thanks for reading, and feel free to make pull requests and/or suggestions below.
Can you provide some details or links to information as to what problems with LINQ you are solving in terms of Unity usage? I’m not immediately aware, and there may be other users that do not know either.
The pure performance issue (usually a problem on mobile / web platforms in general) is caused by Unity’s garbage collector as far as I am aware. Specifically It all revolves around the allocation of the iterator object with IEnumerable interface, which for some reason is even slower than doing a standard for loop and assigning a variable yourself to be like the iterator.
There are a ton of posts out there from disgruntled developers, and a fair bit of information on the topic on google.
In terms of the AOT/IL2CPP issues, I believe Unity themselves have said they do support 100% of the LINQ feature set at the moment. This is ideally where I would like to further expand the project into solving, along side the performance improvements.
I will put some performance comparison charts up in the near future. The initial testing I did gave very significant (like 30% +) improvements in performance at ‘stress scales’.