4 ms·
> Try using GNU parallel to sort a list of numbers, `parsort` is part of GNU Parallel.
by MainJane 5y ago
> Try using GNU parallel to sort a list of numbers,
`parsort` is part of GNU Parallel.
- adwn 5y ago... and it uses a manually implemented post-processing step. You can't just run the sort program with GNU parallel and expect to get a fully sorted list.
- MainJane 5y ago> Try using GNU parallel to sort a list of numbers, [...] – it's not possible, Yet it clearly is possible, so your blanket statement is clearly wrong. `parsort` a simple wrapper, and this really goes for many uses of GNU Parallel: You need to prepare your data for the parallel step and post-process the output. Maybe you originally meant to say: "Only for those processes, where you can preprocess the input and post-process the outputs."
- adwn 5y agoWhy would you use GNU parallel if you have to implement your own non-trivial pre- or post-processing logic anyway? Just spawn the worker processes yourself. GNU parallel is great if you have, e.g., a bunch of files, each of which needs to be processed individually, like running awk or sed over it. Then you can just plop parallel in front and get a speedup for free. That's not what parsort does.