|
|
|
|
|
by 0xffff2
2690 days ago
|
|
While your comment is true, I'm not sure how it's relevant. `ToArray` is still operating on the `IEnumerable` produced by Select, which doesn't tell you that the Select is itself operating on an array. The CLR does do some type checking to try to propagate the size if it can, but that's by no means guaranteed. Edit: In skimming the source available on sourceof.net, it looks to me like the array doesn't actually get propagated far enough, so the construct in GP will in fact incur several unnecessary array copies. |
|