cmark

My personal build of CMark ✏️

Commit
0d29e8da52f31e76ac8df77c50e027580e1e83fa
Parent
67c5944b02d0dcabd8e928dbc997b41c03000b0b
Author
John MacFarlane <jgm@berkeley.edu>
Date

Improved 'make bench'.

Diffstat

2 files changed, 15 insertions, 6 deletions

Status File Name N° Changes Insertions Deletions
Modified Makefile 18 13 5
Modified README.md 3 2 1
diff --git a/Makefile b/Makefile
@@ -62,7 +62,7 @@ archive: spec.html $(BUILDDIR)
 	echo "Created $(TARBALL) and $(ZIPARCHIVE)."
 
 clean:
-	rm -rf $(BUILDDIR) $(MINGW_BUILDDIR) $(MINGW_INSTALLDIR) $(TARBALL) $(ZIPARCHIVE) $(PKGDIR) benchmark.md
+	rm -rf $(BUILDDIR) $(MINGW_BUILDDIR) $(MINGW_INSTALLDIR) $(TARBALL) $(ZIPARCHIVE) $(PKGDIR)
 
 $(PROG): all
 
@@ -115,12 +115,19 @@ fuzztest:
 	done } 2>&1 | grep 'user\|abnormally'
 
 # for benchmarking
-benchmark.md: progit.md
-	for x in `seq 1 10` ; do cat $< >> $@; done
+benchmark.md: progit/progit.md
+	-rm $@; for x in `seq 1 20` ; do cat $< >> $@; done
+
+progit:
+	git clone https://github.com/progit/progit.git
+
+progit/progit.md: progit
+	cat progit/en/*/*.markdown > $@
 
 bench: benchmark.md
-	{ for x in `seq 1 20` ; do \
-	  sudo chrt -f 99 /usr/bin/env time -p ${PROG} $< >/dev/null ; \
+	{ sudo renice 99 $$$$; \
+	  for x in `seq 1 20` ; do \
+	  /usr/bin/env time -p ${PROG} $< >/dev/null ; \
 		  done \
 	} 2>&1  | tee rawdata | grep 'user' |\
 	          awk '{print $$2}' | \
@@ -134,6 +141,7 @@ distclean: clean
 	-rm -rf *.dSYM
 	-rm -f README.html
 	-rm -f spec.md fuzz.txt spec.html
+	-rm -rf benchmark.md progit
 
 ### JavaScript ###
 
diff --git a/README.md b/README.md
@@ -16,8 +16,9 @@ written in standard C99 and has no library dependencies.  The parser is
 very fast, on par with [sundown](https://github.com/vmg/sundown).  Some
 benchmarks (on an ancient Thinkpad running Intel Core 2 Duo at 2GHz,
 measured using `time` and parsing a ~500K book, the English version of
+the 1st edition of
 [*Pro Git*](https://github.com/progit/progit/tree/master/en) by Scott
-Chacon and Ben Straub):
+Chacon):
 
 |Implementation | Time  |  Factor|
 |---------------|-------|--------|