|
|
|
|
|
by chubot
1787 days ago
|
|
The pure bash solution has overhead too. If you need to split 1000 strings it will create, write, and read 1000 temp files. Depending on your hardware and file system, that's more expensive than creating 1000 or 2000 processes. I would worry about making it correct before making it fast, the former being a big challenge! Shells Use Temp Files to Implement Here Documents : http://www.oilshell.org/blog/2016/10/18.html (Oil doesn't do this; it creates a process for here docs without touching disk. In theory this could be eliminated for here docs less than PIPE_BUF, which is probably a lot of them) |
|