Summary

In this chapter, we saw how our sequential algorithms can easily gain performance by running in parallel. This parallelism can be obtained in multiple ways, and in this chapter, we learned about multithreading. We saw how multithreading is really safe in Rust, and how we can take advantage of the crate ecosystem to improve our performance even more.

We learned about some performance enhancements we can develop for our multithreaded code, and how to use all the available tools to our advantage. You can now develop a high-performance concurrent application in Rust using multiple threads.

In the next chapter, we will look at asynchronous programming. The primitives we will look at enable us to write concurrent programs that won't lock ...

Get Rust High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.