i have the code here Example
the site has a memory limit
but if you change the PersonCount to 100,000 and GroupCount to 300
and run the code in your computer
you see it takes about 600 Milliseconds to run the linq experssion and group it.
the array has 30,000,000 items and i shuffle it
how can Linq do it so FAST ?
UPdate:
i add "var result=it.ToArray();" to code
and it actualy did somesthing
but it still fast !