t/curse: add a Makefile so we can compare speed when using GNU make.

redo: 5.4s
redo -j4: 3.0s
make: 2.3s
make -j4: 1.4s
make SHELL=/bin/dash: 1.2s
make SHELL=/bin/dash -j4: 0.83s

We have some distance to go yet.  Of course, redo is still written in
python, not C, so it's very expensive, and the on-disk dependency store is
very inefficient.
This commit is contained in:
Avery Pennarun 2010-11-21 00:31:48 -08:00
commit de042fc2f2
5 changed files with 44 additions and 16 deletions

View file

@ -1,18 +1,5 @@
rm -f in.countall out.countall *.count
touch in.countall out.countall
echo x >x.count
. ./check-1.sh
redo-ifchange 1.n0 2.n0 3.n0
DEPS=$(seq 10 | sed 's/$/.n1/')
redo-ifchange $DEPS
COUNT_IN=$(ls *.count | wc -l)
COUNT_OUT=$(cat *.count | wc -l)
if [ "$COUNT_IN" != "$COUNT_OUT" ]; then
echo "expected $COUNT_IN individual writes, got $COUNT_OUT" >&2
exit 42
fi
COUNTALL_IN=$(cat in.countall | wc -l)
COUNTALL_OUT=$(cat out.countall | wc -l)
if [ "$COUNTALL_IN" != "$COUNTALL_OUT" ]; then
echo "expected $COUNTALL_IN allwrites, got $COUNTALL_OUT" >&2
exit 43
fi
. ./check-2.sh