Skip to content

Comment on How AST-grep Rewrote Tree-sitter in Rust and Made It 30% Fasterparent

Comments

isn’t the entire point of tree-sitter that you can reuse old trees to make edit updates faster?

I've used tree-sitter for a few projects, but I never touched the tree-reuse stuff. The value of tree-sitter came from the fact that grammars compile to a .so and can be easily distributed through package managers. Adding support for a new grammar in ast-grep might just mean pointing to the .so at runtime (idk, I haven't checked). So this optimization might make sense for this project.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.