On Aug 16, 2006, at 7:18 AM, Paul M Jones wrote:

On Aug 16, 2006, at 12:13 AM, John Gruber wrote:

Paul M Jones <[EMAIL PROTECTED]> wrote on 8/15/06 at 10:21 AM:

I'm happy to take feedback and suggestions for improving the code,
and I hope it can be of use to any PHP 5 folks who love Markdown.

Any word on performance differences from Michel's implementation?

No hard numbers yet; my intuition is that the Solar implementation will be slower, due to the much larger number of files and separate classes. The tradeoff is flexibility. I'll set up some benchmarks and report back.

You can see the benchmark files here:

* <http://solarphp.com/svn/trunk/tests/Bench/Solar/Markdown.php>

* <http://solarphp.com/svn/trunk/tests/Bench/Solar/Markdown/>

Each iteration transforms the "Markdown Documentation - Syntax.text" file from the test suite. Running on my 1.4GHz PPC Mac Mini (1 gig RAM), results are:

* benchSolarMarkdown ran 62075 iterations in 2 minutes (517/second)

* benchPhpMarkdown ran 125904 iterations in 2 minutes (1049/second)

So the functional/procedural PHP-Markdown is a little more than twice as fast as plugin-capable Solar_Markdown. If you transform the source text anew on every page load, this might be an issue; if you cache the transformed text for subsequent page loads, it's probably not.




-- pmj
_______________________________________________
Markdown-Discuss mailing list
[email protected]
http://six.pairlist.net/mailman/listinfo/markdown-discuss

Reply via email to