Fastest yes in the west
C, 112 bytes, 28 TB/s, score ≈ 0.008

long b[9&lt;&lt;21];main(){for(b[2]=write(*b=1,wmemset(b+8,'\ny\ny',1&lt;&lt;25),1&lt;&lt;27)/2;b[3]=b[2]*=2;ioctl(1,'@ &#148;\r',b));}


(If you’re having trouble copying and pasting this, replace the multicharacter constant '@ &#148;\r' with '@ \x94\r' or 1075876877.)

This writes 128 MiB of y\ns to stdout, and then repeatedly invokes the FICLONERANGE ioctl to double the file’s length by adding new references to the same disk blocks.  Requires Linux x86-64 and a filesystem supporting FICLONERANGE, such as Btrfs or XFS; stdout must be opened in read-write mode (e.g. ./prog 1&lt;&gt; out in bash).

Self-contained testing script

This script loop-mounts a freshly created filesystem from a memory-backed image file and runs the program there.  (I get about 43 TB/s in-memory, but the ratio with yes(1) is similar.)  It works with either Btrfs or XFS, but Btrfs seems to give better scores.

#!/usr/bin/env bash
set -eux
dir="$(mktemp -dp /dev/shm)"
cd "$dir"
trap 'umount fs || true; rm -r "$dir"' EXIT
printf "long b[9&lt;&lt;21];main(){for(b[2]=write(*b=1,wmemset(b+8,'\\\\ny\\\\ny',1&lt;&lt;25),1&lt;&lt;27)/2;b[3]=b[2]*=2;ioctl(1,'@ \\x94\\\\r',b));}" &gt; prog.c
b="$(stat -c %s prog.c)"
gcc -O3 prog.c -o prog
dd of=fs.img bs=1 count=0 seek=8G

# Pick one:
mkfs.btrfs fs.img
#mkfs.xfs -m reflink=1 fs.img

mkdir fs
mount fs.img fs
sync
timeout 1 yes 1&lt;&gt; fs/out || true
y="$(stat -c %s fs/out)"
rm fs/out
sync
timeout 1 ./prog 1&lt;&gt; fs/out || true
y1="$(stat -c %s fs/out)"
echo "score = $b * $y / $y1 = $(bc -l &lt;&lt;&lt; "$b * $y / $y1")"