You cannot compare Knuth's software with a script that use pre compiled tools that have thousands of lines.
If you want to compare both solutions, use the Kolmogorov complexity: compress both programs together with any tool/compiler it uses and just then, compare both sizes. I bet Knuth's solution has an order of magnitude less complexity.