Hacker News new | ask | show | jobs
by Wintamute 4824 days ago
So .NET with its massive, stable, mature native sorting libs is faster at sorting than async.sortBy, which is about 25 lines of JS. Well, no surprises there.
2 comments

Worse, it's a complete misuse and misunderstanding of async.sortBy: TFA implements a "SortAsync" by performing a Sort call in its own task, byt async.sortBy uses a task (an async callback) as its key function, so it calls and waits on a callback for each item in the original array where SortAsync TFA's SortAsync just blasts a single native Sort when the task runs.
Except, .NET sorting is implemenented in C# itself, not with native code.