737x Faster LangGraph Checkpoints: Where Rust Wins and Where It Loses
fast-langgraph accelerates LangGraph's deepcopy-based checkpointing with Rust, delivering up to 737x speedups on large state but no gain on small flat dicts.
In long-running LangGraph agents, the real bottleneck often isn't the model call but the per-step checkpoint serialization done via Python's deepcopy. fast-langgraph rewrites these hot paths in Rust while preserving full LangGraph API compatibility, reporting 737x speedup on 250KB complex states, 178x on 35KB states, 13-46x on sustained state updates, and roughly 10x savings from LLM response caching at high hit rates. A zero-code-change automatic patching mode yields about 2.8x on typical workloads.
Notably, the project is transparent about its limits: on small flat dicts, Python's C-implemented dict already wins and Rust offers nothing. Caching is useless when prompts are all unique, and without checkpointing enabled you're left with a more modest 2-3x end-to-end gain. The big numbers are fundamentally about state size and serialization overhead, not a blanket language advantage.
Adoption comes in two forms: an automatic shim that patches LangGraph's internal functions like apply_writes at import time, or manual components such as RustSQLiteCheckpointer and langgraph_state_update for maximum gains. A built-in profiler lets developers identify their actual hot path before optimizing.
Overall, this tool matters for engineers running large, checkpoint-heavy production agents, while short, cheap agent loops see little to no benefit. It supports Python 3.9+ and any LangGraph version, with source available on GitHub.