Rewrite, optimize, repeat:
our journey porting a triemap from C to Rust

By Luca Palmieri

Talk - Wednesday, 17 September
12:00

In this talk, we’ll share our experience porting a battle-tested C TrieMap implementation to Rust, as part of a larger C-to-Rust migration of Redis’ search capabilities.

We’ll walk through the missteps, the initial design we implemented and then discarded, the profiling rabbit holes, and the eventual breakthroughs that led us to a Rust version that not only matched but outperformed the original, without compromising safety and memory usage.

Along the way, we’ll cover design tradeoffs, lessons in data layout, and how custom DSTs and a deep understanding of Rust’s memory model helped us turn a rewrite into a real upgrade. If you’ve ever been tempted to replace C with Rust (or you’re planning to), this talk is for you.

Speaker

Luca Palmieri

Luca Palmieri builds technology products for a living. He currently works at Mainmatter as a Principal Consulting Engineer, guiding clients on how to best leverage Rust in their projects. His current focus is on backend development, software architecture and the Rust programming language. He is the author of Zero to Production in Rust, 100 Exercises to Learn Rust and Pavex.