4 ms·
I think it will be faster than python or perl, because the actual work is done by optimized c-code. However if you want to extend the program from a toy to som
by im3w1l 3y ago
I think it will be faster than python or perl, because the actual work is done by optimized c-code.
However if you want to extend the program from a toy to something that can handle words like "won't" "c-code" "a.i." or "naïve" then it will be quite difficult to do so.
- tyingq 3y agoI tried a perl script versus the shell pipeline, see my other comments in the thread. It's significantly faster, because using sort and uniq -c is a pretty high effort way to count words, especially for big lists. Your words seem to work fine with it, it's just splitting on whitespace.