Thanks for explaining my own comment to me.
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 ;)