Hacker News new | past | comments | ask | show | jobs | submit login
Marked.js is a markdown parser built for speed (github.com/chjj)
62 points by chjj on Jan 9, 2012 | hide | past | favorite | 7 comments



Curious, I realize this is a node module, but is there any reason I couldn't be run directly in the browser (I'd go through the code and try it myself, but it's bed time for me).


"It is also now fully compatible with the client-side."

From the documentation.


I'm curious why you'd write something like this in Javascript if you're aiming for performance.

There's nothing wrong with using Javascript for a Markdown parser but if it's supposed to be 'built for speed', you'd be better off using a lower level language.


The benchmark posted in the project's readme shows that it's nearly as fast as Discount, which is a Markdown parser written in plain C. You underestimate modern JS engines.


Its not "built for speed". Its build for speed and for the browser.


and for node. And it's almost as fast as a C implementation. JS isn't terrible, you know. People just never learn it because it's confusing. It's more similar to lisp than to C, except for the syntax.

And built for speed doesn't mean "the fastest." It just means within this implementation the goal was speed.


The benchmark is very impressive. Thanks for this!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: