Perl 5.18.0 gives me 3.5 MiB per second. Perl 5.28.3, 5.30.3, and 5.34.0 gives 4 MiB per second.
perl5.34.0 -e 'while (){ print 1 }' | pv > /dev/null
python3 -c 'while (1): print (1)' | pv > /dev/null
perl5.34.0 -e 'while (){ print "1\n" }' | pv > /dev/null
perl5.34.0 -E 'while (1) {say 1}' | pv > /dev/null
package main import "fmt" func main() { for ;; { fmt.Println("1") } }
Perl 5.18.0 gives me 3.5 MiB per second. Perl 5.28.3, 5.30.3, and 5.34.0 gives 4 MiB per second.
For Python 3.10.4, I get about 2.8 MiB/s as you have it written, but around 5 MiB/s (same for 3.9 but only 4 MiB/s for 3.8) with this. I also get 4.8 MiB/s with 2.7: If I make Perl behave like yes and print a character and a newline, it has a jump of its own. The following gives me 37.3 MiB per second. Interestingly, using Perl's say function (which is like a Println) slows it down significantly. This version is only 7.3 MiB/s. Go 1.18 has 940 KiB/s with fmt.Print and 1.5 MiB/s with fmt.Println for some comparison. These are all macports builds.