News for hackers. Stuff that matters.
Re:How fast are Linux pipes anyway? by ur-whale on Thursday June 02, 2022 @08:48AM (#31594134)
for the bash case, the cost of forking to write two chars is overwhelming compared to anything related to I/O.
Re:How fast are Linux pipes anyway? by mauvehaus on Thursday June 02, 2022 @09:02AM (#31594302)
Echo and printf are shell built-ins in bash[0]. Does it have to fork to execute them?

You could probably answer this by replacing printf with /bin/echo and comparing the results. I'm not in front of a Linux box, or I'd try.

[0] https://www.gnu.org/software/bash/manual/html_node/Bash-Buil...

Re:How fast are Linux pipes anyway? by ur-whale on Thursday June 02, 2022 @11:19AM (#31595956)
> Echo and printf are shell built-ins in bash

Ah, yeah, good point, I am wrong.

Re:How fast are Linux pipes anyway? by megous on Thursday June 02, 2022 @08:56AM (#31594228)
There's no forking and it's wrinting one character.