Re: when rational discussion was still a possibility
andrei_fangli at hotmail.com
Sat Sep 6 03:08:01 EDT 2014
Times without hardware specs mean nothing, please also provide some hardware specs to get a more accurate idea about performance.
The C implementation sounds promising, but to be able to use it (speaking from a .NET point of view) I would need to compile it to a dll and reference it through a wrapper CLI class that handles interop such as string conversion to C char array, or C wide char array and then back again with the result lest your code works only with files which can complicate things.
From: John MacFarlane
Sent: Saturday, 6 September 2014 07:16
To: markdown-discuss at six.pairlist.net
+++ Michel Fortin [Sep 05 14 17:07 ]:
>From an implementer point of view, unless a detailed standard is written as a description of what your own parser does, you'll have to spend a lot of time tweaking things to match that standard. By "a lot of time" I mean more than what it took you to implement the parser in the first place. Remember, it's always getting the last 20% that takes 80% of the time. So you'll spend a lot of time to achieve some dubious tradeoff. Implementers have better things to do with their time.
>So my conclusion is that if you want one or another Markdown flavor to become the standard, you need to find a way for its implementation to be included everywhere. But with all the diverse language ecosystem we have, and with the varied needs of different communities using Markdown, that seems quite difficult to achieve. I'd call that impossible.
What you did at the beginning, I gather, was to port (and then extend)
an existing implementation, Markdown.pl. The same will be possible with
CommonMark, which provides two implementations that use the same parsing
port to other dynamic languages: perl, python, ruby, PHP. (Or you could
rendering.) Those who work with compiled languages will be able to use
the C library directly.
The parsers are both fast and accurate. The original C parser I wrote
was about as fast as discount. An expert C coder is now working on
otimizing it and, without changing the algorithm, has managed to make it
about as fast as sundown, which is very fast indeed (0.01 seconds to
parse a 1MB document, for example). When optimization is complete, it
seconds for the above-mentioned 1MB document, running in the Chrome
browser). By comparising, Markdown.pl takes 250 seconds on the same
input, and pandoc takes 3.19 seconds.
Markdown-Discuss mailing list
Markdown-Discuss at six.pairlist.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Markdown-Discuss