Click any tag below to further narrow down your results
Links
This article explains techniques for shrinking the size of a Rust static library intended for use with Go. It details the process of removing unused code, optimizing linked sections, and converting LLVM bitcode to achieve a significantly smaller library file. The author shares practical steps and results of the optimization efforts.
The article details a case study where a payment service at TikTok, originally built in Go, faced CPU bottlenecks due to increased traffic. By selectively rewriting the most CPU-intensive endpoints in Rust, the team achieved double the performance and projected annual savings of $300,000 in cloud costs.
The author discusses the slow build times associated with the Rust compiler when deploying applications in Docker, particularly when using statically linked binaries. By exploring various compilation techniques and tools like cargo-chef, they aim to improve build efficiency while analyzing the performance bottlenecks in the compilation process, specifically focusing on link-time optimization (LTO) and LLVM-related tasks.
SQLite query optimization significantly improved the performance of the Matrix Rust SDK, boosting event processing from 19,000 to 4.2 million events per second. The article details the structure of data persistence using LinkedChunk and how identifying and addressing inefficiencies in SQL queries led to this enhancement. It emphasizes the importance of profiling tools and strategic indexing to optimize database interactions.
Enums in Rust are optimized for memory usage, resulting in smaller representations for certain types. The article explains how the Rust compiler employs techniques like niche optimization and memory representation to efficiently manage enum sizes, particularly in nested enums. It highlights surprising findings, such as the compiler's ability to use tags and niches effectively to minimize memory overhead.
Tree Borrows is a new framework that enhances the Rust programming language's ownership-based type system by replacing the stack in Stacked Borrows with a tree structure. This change reduces the rejection of valid test cases by 54% and enables additional optimizations, including read-read reorderings, while maintaining most benefits of the original Stacked Borrows. The work was recognized with a Distinguished Paper Award at PLDI'25.