|
|
|
|
|
by t43562
1507 days ago
|
|
The shell's advantage is that of the pipeline components don't need to suck the whole file in so it can potentially operate on much larger files without running out of memory. I think only "sort" is problematic and at least it's a merge sort. In Python you could use a generator but it would get a little more complicated and you'd still have to add all the words to set() but hopefully the number of different words is not that great. The trie approach is quite memory efficient and that can matter. |
|