Replies: 2 comments
-
I converted this to a discussion thread since we're trying to move toward using Discussions for these types of conversations. The advantage is that they never need to be closed, and they're not mixed in with the more traditional "issues" that each capture an actionable item. |
Beta Was this translation helpful? Give feedback.
-
I don't know very much about Papa Carlo, but I do think that a JSON parser is a bit too trivial to do a meaningful performance comparison. JSON doesn't seem like it would require the fully general machinery of incremental parsing that Tree-sitter uses. It's true that the WASM target is a bit slower than native. I haven't done as much profiling and optimization on the WASM binding specifically as I have on the native library. If you're interested in doing any profiling and optimization work, that would be great. |
Beta Was this translation helpful? Give feedback.
-
edit: error in measurement: i compared pc's JSON-parser to ts's JS parser
papa-carlo is another incremental parser generator, written in scala
the onllne demo shows latencies around 50 microseconds for update operations
compared to 200 microseconds (0.2ms) reported by the tree-sitter onllne demo
that would mean, tree-sitter's javascript interface is 4 times slower than that of papa-carlo
possible reason: bottleneck in the WASM interface
reminds me of https://media.tojicode.com/sfjs-vectors/#9
where object-allocation was the problem
(more benchmarks anyone? specifically for incremental parsers)
Beta Was this translation helpful? Give feedback.
All reactions