Is Array.Sort() Multithreaded in VB.NET
I know that Array.Sort()
in VB.NET uses the quicksort algorithm. But my question is, does it take advantage of multithreading?开发者_如何转开发
I'm sorting a list of hundreds of thousands of records, and need to ensure the fastest sort times.
Thanks.
I'm not sure how multi-threading would make your sorting faster.
Array.Sort
does sorting in a single thread.
If by multi-threading you actually mean taking advantage of several processors when they are available, check out this answer that uses Parallel Extensions (available in .NET 4.0 and partly available for .NET 3.5).
精彩评论