May 9, 2024

Rust at Google, Outperforming C++ and Matching Go

High-Performance Software Consulting, Training, Staffing, & Development

At Rust Nation UK, Lars Bergstrom – director of engineering at Google – announced the results of Google’s foray into using Rust. Rust was a great success – and the study’s key points underline Rust’s remarkable efficiency in real-world projects.

Google tasked different teams with rewriting identical services. The Go and Rust teams finished at the same speed – and the C++ team required twice as long to complete the assigned task. This represents considerable progress for Rust: Rust manages to equal the incredibly productive Go language in development speed.

Go and Rust are both high-performance, memory-safe languages. Go provides safety through a garbage collector, freeing developers from the need to manage memory. Rust takes the opposite approach: there is no garbage collector, instead the compiler strictly enforces safety rules, preventing most common memory problems from compiling. The Rust language is designed to abstract developers away from many memory management details – until you need them. Rust’s ergonomics proved to be equal to Go’s in development time.

“Rust’s ergonomics proved to be equal to Go’s in development time.”

Rust also emphasizes correctness. Many common bugs – from memory issues to data race conditions – won’t compile at all in Rust. The Rust community heavily favors sound, correct code. Rust safety emphasis led Google to survey their developers: “How confident do you feel that your team’s Rust code is correct?” The answer is an astounding 85 percent.

When compared with C++, Rust offers most of the same advantages: low-level access, high performance, and (particularly with “Modern C++”) automatic resource management. Rust takes it further, providing a modern core and language ergonomics that have led Stack Overflow developers to repeatedly name it their “most loved language”.

Google’s findings underscore the transformative potential of Rust in software development, highlighting its ability to rival Go in productivity while outperforming C++ by a considerable margin. This serves as a testament to Rust’s effectiveness in real-world projects, where safety, performance, and productivity are paramount.

“Google's findings underscore the transformative potential of Rust in software development, highlighting its ability to rival Go in productivity while outperforming C++ by a considerable margin.”

As the software development landscape continues to evolve, Rust emerges as a compelling choice for developers seeking to build efficient, reliable, and secure systems. With its growing ecosystem, vibrant community, and endorsement from industry leaders like Google, Rust is poised to redefine the future of software development.

“Rust is poised to redefine the future of software development.”

In conclusion, the productivity surge observed in Rust teams at Google exemplifies the language’s ability to revolutionize software development. Whether you’re a seasoned developer or a newcomer to programming, Rust offers a pathway to enhanced productivity, efficiency, and innovation. Embrace Rust today and unlock a world of possibilities in software development.

Reference

​​In reference to the talk given by Lars Bergstrom, Google Director of Engineering, at Rust Nation UK 2024. You can find his entire presentation in this YouTube link.

If you want to learn Rust with us, learn more about our Rust training options by clicking here. Start your journey of growth and innovation with Ardan Labs today.


By: Herbert Wolverson


Trusted by Top Technology Companies

We've built our reputation as educators and bring that mentality to every project. When you partner with us, your team will learn best practices and grow along the way.

30,000+

Engineers Trained

1,000+

Companies Worldwide

14+

Years in Business