John MacFarlane says he has designed the Standard Markdown reference implementations (in C and JavaScript) to be fast.
I'll let him explain.
I have designed the implementations to be fast -- e.g. avoiding backtracking whenever possible. I have optimized them to the best of my ability, but I'm not a js or C wizard, so I'm sure they can still be improved.
I can give you some data on performance.
make benchjs
on my macbook air says:
So there may be room for improvement; but of course, marked isn't as accurate a converter, so some of its speed may be due to short cuts it is taking.
My tests of the C implementation suggest that its performance is about the same as discount's. For example, on my laptop it takes 0.03s (user) to convert a 179K manual. It seems to me that this should be fast enough. sundown is considerably faster, though, so again there may be room for improvement -- though again, I worry that sundown achieves the performance by making many shortcuts that make proper parsing impossible. Anyway, I am sure C experts will be able to improve the performance quite a bit.
Discussion is welcome here, of course, but if you have specific performance improvements to contribute, open pull requests at
https://github.com/jgm/stmd