New parser-based Markdown implementation for Java

Allan Odgaard 1EDF4D33-D1B1-4C97-A393-3D2B4EE5E095+Markdown at uuid-mail.com
Mon May 3 04:29:34 EDT 2010


On 3 May 2010, at 09:42, Mathias wrote:


> 1. Test Suite: Is there anything more than John Grubers test suite

> that you know off? Maybe a good, large file for benchmarking? I'd

> like to compare pegdowns performance to some other implementations.

> I could also run the original test suite a few times in a row for

> benchmarking but maybe there is another more accepted benchmark

> available somewhere?


Not aware of one but I wrote the TextMate manual in Markdown and it is
available here: http://svn.textmate.org/trunk/Manual/pages/en/

So this is a real-world example of Markdown use. I convert both each
page individually and all of them for the printable version¹.

Example:

% svn co http://svn.textmate.org/trunk/Manual/pages/en/
% cd en
% for f in *.mdown; do { cat "$f"; echo; } >> printable.mdown; done
% time for f in *.mdown; do Markdown.pl < "$f" > /dev/null; done
real 0m4.503s

This is on a 2.8 GHz Quad Core Intel Xeon (and using Markdown 1.0.1).
75% of the time is spent on printable.mdown.

I btw have some references I normally append to the input, but these
are not in the public repos. If you want to use the pages for a real
benchmark suite and want the references, let me know.


¹ I actually concat the HTML versions, but for a benchmark it would be
good with also a large file, and this one isn’t exactly contrived.



More information about the Markdown-Discuss mailing list