Not explaining, trying to tell that you are comparing apples to oranges and making a conclusion based on that.
Also, you don't need to spawn a subshell nor feed sort via stdin in the first example :)
Also, you don't need to spawn a subshell nor feed sort via stdin in the first example :)
Heck, forget about RAM, the output of both programs don't even match.
That awk is pretty efficient and fast is no surprise ;)