Replacing Protobuf with Rust to go 5 times faster
Summary
PgDog replaced Protobuf-based Rust bindings with direct C-to-Rust bindings for libpg_query, achieving around 5x faster parsing and 10x faster deparsing in benchmarks. The post details the motivation, AI-assisted coding process, caching strategy, and the recursive translation approach, with practical takeaways for performance and maintainability.