# MD4C: New implementation in C

**URL:** <https://talk.commonmark.org/t/md4c-new-implementation-in-c/2302>\
**Category:** Implementation\
**Created:** [November 24, 2016, 2:16pm UTC](https://talk.commonmark.org/t/md4c-new-implementation-in-c/2302 "2016-11-24T14:16:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jgm](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/jgm/32/1360_2.png) [@jgm](https://talk.commonmark.org/u/jgm)\
**Post date:** [November 25, 2016, 12:02pm UTC](https://talk.commonmark.org/t/md4c-new-implementation-in-c/2302/4 "2016-11-25T12:02:59Z")

</div>

Another nice diagnostic from the cmark Makefile is `make fuzztest`, which runs the program against ten randomly generated 200k strings of UTF-8 characters.

cmark is nice and even:

```auto
~/src/cmark % make fuzztest PROG=./cmark
{ for i in `seq 1 10`; do \
	  cat /dev/urandom | head -c 2000000 | iconv -f latin1 -t utf-8 | tee fuzz-$i.txt | \
		/usr/bin/env time -p ./cmark >/dev/null && rm fuzz-$i.txt ; \
	done } 2>&1 | grep 'user\|abnormally'
user 0.04
user 0.05
user 0.05
user 0.05
user 0.04
user 0.05
user 0.04
user 0.05
user 0.05
user 0.05

```

md2html doesn’t do so well on this:

```auto
~/src/cmark % make fuzztest PROG=md2html
{ for i in `seq 1 10`; do \
	  cat /dev/urandom | head -c 2000000 | iconv -f latin1 -t utf-8 | tee fuzz-$i.txt | \
		/usr/bin/env time -p md2html >/dev/null && rm fuzz-$i.txt ; \
	done } 2>&1 | grep 'user\|abnormally'
Command terminated abnormally.
user 20.88
user 0.15
user 0.17
user 0.31
Command terminated abnormally.
user 21.04
Command terminated abnormally.
user 20.99
user 0.22
user 0.23
user 0.38
Command terminated abnormally.
user 20.80

```

---

_[View the full topic](https://talk.commonmark.org/t/md4c-new-implementation-in-c/2302)._
