Benchmarks with TextMate's manual
Michel Fortin
michel.fortin at michelf.com
Mon Aug 27 16:42:57 EDT 2007
The following benchmarks have been obtained using the TextMate manual
as the input source:
<http://macromates.com/textmate/manual/source.tbz>
Using PHP Markdown, parsing the 24 files separately (with the
reference file appended to each of them), I get this (on an iBook G4
1.2 Ghz):
Total Avg. Min. Q1. Med. Q3. Max.
Parse Time (ms): 2616 109 13 64 89 125 433
Diff. Min. (ms): 2292 95 0 51 75 112 419
Doing the same with Markdown.pl 1.0.2b8:
Total Avg. Min. Q1. Med. Q3. Max.
Parse Time (ms): 11912 496 206 241 273 387 2064
Diff. Min. (ms): 6966 290 0 35 67 181 1858
Of interest is the same thing with Markdown.pl 1.0.1:
Total Avg. Min. Q1. Med. Q3. Max.
Parse Time (ms): 5883 245 148 168 194 220 957
Diff. Min. (ms): 2310 96 0 19 46 71 808
The older version takes half the time. I think we're seeing here the
drop in performance from Markdown.pl 1.0.2's new HTML block parser.
Note that the way Markdown.pl is built, the HTML block parser is
called for each Markdown-generated code, which means that you don't
need to have HTML blocks in the source to experience a noticeable
drop of performance when the HTML block parser gets slower. PHP
Markdown used to work the same, but this changed at version 1.0.1d.
Now, the interesting part of the test: combining all the documents
together and parsing them in one shot (352 Ko). With PHP Markdown it
takes 29 seconds; with Markdown.pl 1.0.1 it takes 71 seconds. Beside
the obvious speed difference between PHP Markdown and Markdown.pl
(probably due to what I mentioned above), this test shows that
neither PHP Markdown or Markdown.pl scale well for big documents.
I'll let you draw your own conclusions.
Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
More information about the Markdown-Discuss
mailing list