3 ms·
That caches though. You can see it when you strace it.
by mg 4y ago
That caches though. You can see it when you strace it.
- klohto 4y agoGood point, but so does a standard print call. Calling flush() after each write does bring the perf to 1.5MiB
- rovr138 4y agopython3 -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.