News for hackers. Stuff that matters.
Re:How fast are Linux pipes anyway? by mg on Thursday June 02, 2022 @09:44AM (#31594804)
That caches though. You can see it when you strace it.
Re:How fast are Linux pipes anyway? by rovr138 on Thursday June 02, 2022 @10:01AM (#31594992)

    python3 -u -c 'import sys
      while (1): sys.stdout.write("1")'| pv>/dev/null
427KiB/s

    python3 -c 'import sys
      while (1): sys.stdout.write("1")'| pv>/dev/null
6.08MiB/s

Using python 3.9.7 on macOS Monterey.

Re:How fast are Linux pipes anyway? by klohto on Thursday June 02, 2022 @09:49AM (#31594875)
Good point, but so does a standard print call. Calling flush() after each write does bring the perf to 1.5MiB