Themata.AI
Themata.AI

Popular tags:

#developer-tools#ai-agents#llms#claude#ai-ethics#code-generation#ai-safety#openai#anthropic#discussion

AI is changing the world. Don't stay behind. Clear summaries, community insight, delivered without the noise. Subscribe to never miss a beat.

© 2026 Themata.AI • All Rights Reserved

Archive

|

Topics

|

Privacy

|

Cookies

|

Contact
rustcode-generationdeveloper-toolsperformance-optimization

How AST-grep Rewrote Tree-sitter in Rust and Made It 30% Faster

How ast-grep Rewrote Tree-sitter in Rust and Made It 30% Faster

astgrep.com

July 26, 2026

16 min read

🔥🔥🔥🔥🔥

48/100

Summary

ast-grep rewrote Tree-sitter's C core in Rust, resulting in a 30% increase in parser speed and a 22% improvement in overall performance for ast-grep. The new core enhances parsing efficiency and accelerates tree reading.

Key Takeaways

  • ast-grep rewrote Tree-sitter's C core in Rust, achieving a 30% increase in parsing speed and a 22% overall performance improvement for ast-grep.
  • The Rust implementation outperformed the original C version in all parsing and traversal benchmarks, with a throughput increase of up to 29.74%.
  • The new Rust core uses approximately 8 MiB more memory during ast-grep runs compared to the C version, peaking at 91.2 MiB on large datasets.
  • The rewritten Tree-sitter maintains compatibility with existing generated languages and parsers while removing unnecessary editor-specific features.
Read original article

Community Sentiment

Mixed

Positives

  • Implementing incremental parsing improved performance from 5ms to 400us for small edits, showcasing tree-sitter's potential in real-world applications.
  • The ability to easily distribute grammars through package managers is a game-changer for expanding ast-grep's capabilities.

Concerns

  • The removal of incremental old-tree reuse raises concerns that performance gains are achieved at the expense of practical usability in common scenarios.
  • Many commenters find the AI-generated nature of the article disappointing, questioning the authenticity and value of the content.

Related Articles

I wrote a 70x faster SQL parser while barely looking at the code - PostHog

I rewrote PostHog's SQL parser, 70x faster, while barely looking at the code

Jun 24, 2026

Bun Has Been Converted to Rust. Now What?

Bun has been converted to rust. Now what?

Jun 3, 2026

Jimmy Miller

Untapped Way to Learn a Codebase: Build a Visualizer

Feb 20, 2026

I built a Game Boy emulator in F#

I built a Game Boy emulator in F#

Apr 30, 2026

Agent swarms and the new model economics · Cursor

Agent swarms and the new model economics

Jul 20, 2026