tree-sitter-markdown
tree-sitter-markdown copied to clipboard
feature: Add a performance comparison to the README
Did you check the tree-sitter docs?
- [X] I have read all the tree-sitter docs if it relates to using the parser
Is your feature request related to a problem? Please describe.
There is no problem. This is a feature request.
Describe the solution you'd like
It would be useful to see how well the parser generated from this Tree-sitter grammar performs against CMark and CommonMark.js.
Describe alternatives you've considered
No response
Additional context
No response
Note that this parser has a different goal than normal parsers like CMark and CommonMark. Usual parsers are optimized for parsing the file once and outputting a rendered document (for example in html). This tree-sitter parser on the other hand only aims to provide enough information for syntax highlighting, no rendering functionality is provided and the results are "less correct" than what other parsers produce. It is optimized for incremental scanning of the document. Meaning the first parse might be slower but all subsequent parses are fast (or at least that's the idea).
A performance comparison might still make sense since I guess you could also implement syntax highlighting using them, but usually the editors that use tree-sitter for syntax highlighting might not be adapted to doing that. I also expect this method to be quite slow for large files.
But it is unclear what could even be used for a comparison, as this parser does not render anything, which seems to be the basis for comparison at least in CommonMark.js
.