Description
We previously added the *.SizeOpt.cs set of implementations for System.Linq.dll in order to cull out some generics-heavy optimizations that were adding significant overhead (often megabytes of asm in an app) to AOT compilations using LINQ. However, it also adds non-trivial IL size, e.g. a .dll built with the SpeedOpt files is currently ~128K whereas one built with the SizeOpt files is currently ~102K (both sizes are untrimmed).
For target frameworks where size is at a premium, we should consider using these .SizeOpt variants instead.
For AOT builds, we should also look to use these SizeOpt variants.
And if we're not going to use them in either, we should delete them and clean up the cruft. (We also should revisit a few specific optimizations, in particular the ToArray implementation that uses a complicated and large "LargeArrayBuilder", which is likely not worth its weight.)
cc: @marek-safar, @eerhardt