Hacker News·5 min read·medium
How AST-grep Rewrote Tree-sitter in Rust and Made It 30% Faster
H
herrington_d✦AI Summary
The developer of the structural code-search tool ast-grep has successfully rewritten the core of the Tree-sitter parser from C to Rust using AI-assisted development. This optimization results in a 22% end-to-end performance increase for the tool by stripping away editor-specific machinery unnecessary for static analysis.
ast-grep rewrote Tree-sitter's C core in Rust, with AI writing the code. The new core is faster at parsing, faster at reading the completed tree, and faster in ast-grep itself. (The title's “30%” is the parser-only number; end-to-end, ast-grep runs about 22% faster.)
technologyscience
✦
Get the full story
Sign up for Headlinne to unlock AI insights, political bias analysis, and your personalized news feed.
Create free accountAlready have an account? Sign in