From 672c32dc15d420fa4c64df2c04d64d35efbf37d7 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 3 Dec 2015 23:49:05 -0800 Subject: Added why-cmark-and-not-x page. --- why-cmark-and-not-x.md | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 why-cmark-and-not-x.md (limited to 'why-cmark-and-not-x.md') diff --git a/why-cmark-and-not-x.md b/why-cmark-and-not-x.md new file mode 100644 index 0000000..34e013e --- /dev/null +++ b/why-cmark-and-not-x.md @@ -0,0 +1,86 @@ +Why use `cmark` and not X? +========================== + +`hoedown` +--------- + +`hoedown` (which derives from `sundown`) is slightly faster +than `cmark` in our benchmarks (0.21s vs. 0.29s). But both +are much faster than any other available implementations. + +`hoedown` boasts of including "protection against all possible +DOS attacks," but there are some chinks in the armor: + + % time python -c 'print(("[" * 50000) + "a" + ("]" * 50000))' | cmark + ... + user 0m0.073s + % time python -c 'print(("[" * 50000) + "a" + ("]" * 50000))' | hoedown + ... + 0m17.84s + +`hoedown` has many parsing bugs. Here is a selection: + + % hoedown + - one + - two + 1. three + ^D + + + + % hoedown + ## hi\### + ^D +

hi\

+ + + % hoedown + [ΑΓΩ]: /φου + + [αγω] + ^D +

[αγω]

+ + + % hoedown + ``` + [foo]: /url + ``` + + [foo] + ^D +

```

+ +

```

+ +

foo

+ + + % hoedown + [foo](url "ti\*tle") + ^D +

foo

+ + +`discount` +---------- + +`cmark` is about six times faster. + +`kramdown` +---------- + +`cmark` is about a hundred times faster. + +`kramdown` also gets tied in knots by pathological input like + + python -c 'print(("[" * 50000) + "a" + ("]" * 50000))' + + -- cgit v1.2.3