perf: run the gc before each run
The python garbage collector is a large source of performance troubles, we run
it right before the timed section to reduce the change for the gc to add noise
to the benchmark.
#!/usr/bin/env python3
#
# A tool to help producing large and poorly compressible files
#
# Usage:
# $TESTDIR/seq.py 1000 | $TESTDIR/sha256line.py > my-file.txt
import hashlib
import sys
for line in sys.stdin:
print(hashlib.sha256(line.encode('utf8')).hexdigest())