[ANN] Showdown -- A javascript port of Markdown

John Gruber gruber at fedora.net
Wed Feb 28 18:00:02 EST 2007


John Fraser <showdown at attacklab.net> wrote on 2/27/07 at 11:56 PM:


>I've just posted the first public version of Showdown, a full

>javascript port of Markdown.


Fantastic.



>This is mostly a faithful, line-by-line port of Markdown.pl, but I've

>made a few changes to work around missing RegExp features and to

>improve performance. I'm kind of shocked by the speedup I got

>without any algorithmic changes: Showdown converts my 300KB test file

>about 10x as fast as Markdown 1.0.2b2 and 30x as fast as 1.0.2b7.

>More reasonable input shows a smaller (but still substantial)

>improvement. I'm guessing that the major gains are from getting rid

>of md5 hashing, anchoring a wandering regex in `_Detab()`, and

>removing `_TokenizeHTML()` completely.


I'll take a look at the source. The MD5 hashing is surely
needless overhead; that was just a temporary hack I've yet to
bother taking out. I'm curious how you did away with
_TokenizeHTML(), though, at least without "algorithmic" changes.

-J.G.


More information about the Markdown-Discuss mailing list