Rust High Performance: Learn to skyrocket the performance of your Rust applications

Iban Eguia Moraza

  • 出版商: Packt Publishing
  • 出版日期: 2018-03-28
  • 售價: $1,970
  • 貴賓價: 9.5$1,872
  • 語言: 英文
  • 頁數: 272
  • 裝訂: Paperback
  • ISBN: 178839948X
  • ISBN-13: 9781788399487
  • 相關分類: Rust 語言
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Find bottlenecks, identify the proper algorithm to use, optimize performance, and create really efficient Rust applications

Key Features

  • Understand common performance pitfalls and improve the performance of your applications.
  • Get to grips with parallel programming and multithreading with Rust.
  • Learn metaprogramming in Rust.

Book Description

At times, it is difficult to get the best performance out of Rust. This book teaches you to optimize the speed of your Rust code to the level of languages such as C/C++. You'll understand and fix common pitfalls, learn how to improve your productivity by using metaprogramming, and speed up your code by concurrently executing parts of it safely and easily. You will master the features of the language which will make you stand out and use them to really improve the efficiency of your algorithms

The book begins with a gentle introduction to help you identify bottlenecks when programming in Rust. We highlight common performance pitfalls, along with strategies to detect and resolve these issues early. We move on to mastering Rust's type system, which will enable us to create impressive optimizations in both performance and safety at compile time. You will then learn how to effectively manage memory in Rust, mastering the borrow checker. We move on to measuring performance and you will see how this affects the way you write code. Moving ahead, you will perform metaprogramming in Rust to boost the performance of your code and your productivity. You will finally learn parallel programming in Rust, which enables efficient and faster execution by using multithreading and asynchronous programming.

What you will learn

  • Master tips and tricks to make your code faster.
  • Learn how to identify bottlenecks in your Rust applications
  • Discover how to profile your Rust software.
  • Understand the type system to create compile-time optimizations.
  • Master the borrow checker .
  • Learn metaprogramming in Rust to avoid boilerplate code.
  • Discover multithreading and work stealing in Rust.
  • Understand asynchronous programming in Rust.

Who This Book Is For

This book is for Rust developers keen to improve the speed of their code or simply to take their skills to the next level.

Table of Contents

  1. Common performance pitfalls
  2. Extra performance enhancements
  3. Memory management in Rust
  4. Lints and Clippy
  5. Profiling your Rust application
  6. Benchmarking
  7. Built-in macros and configuration items
  8. Must-have macro crates
  9. Creating your own macros
  10. Multithreading
  11. Asynchronous programming

商品描述(中文翻譯)

找到瓶頸、識別適當的演算法、優化性能,並創建真正高效的 Rust 應用程式

主要特點
- 了解常見的性能陷阱並改善應用程式的性能。
- 熟悉 Rust 的並行程式設計和多執行緒。
- 學習 Rust 的元程式設計。

書籍描述
有時候,從 Rust 中獲得最佳性能是困難的。本書教你如何將 Rust 代碼的速度優化到 C/C++ 等語言的水平。你將了解並修正常見的陷阱,學習如何通過使用元程式設計來提高生產力,並安全且輕鬆地通過並行執行代碼的部分來加速你的代碼。你將掌握語言的特性,使你脫穎而出,並利用這些特性真正提高演算法的效率。

本書以輕鬆的介紹開始,幫助你在 Rust 編程時識別瓶頸。我們強調常見的性能陷阱,以及早期檢測和解決這些問題的策略。我們接著掌握 Rust 的類型系統,這將使我們能夠在編譯時創建令人印象深刻的性能和安全性優化。然後你將學習如何有效地管理 Rust 中的記憶體,掌握借用檢查器。我們將進一步測量性能,你將看到這如何影響你編寫代碼的方式。接下來,你將在 Rust 中進行元程式設計,以提升代碼的性能和你的生產力。最後,你將學習 Rust 中的並行程式設計,這通過使用多執行緒和非同步程式設計來實現高效和更快的執行。

你將學到的內容
- 掌握讓你的代碼更快的技巧和竅門。
- 學習如何識別 Rust 應用程式中的瓶頸。
- 發現如何分析你的 Rust 軟體。
- 了解類型系統以創建編譯時優化。
- 掌握借用檢查器。
- 學習 Rust 中的元程式設計以避免樣板代碼。
- 發現 Rust 中的多執行緒和工作竊取。
- 了解 Rust 中的非同步程式設計。

本書適合誰
本書適合希望提高代碼速度或簡單地將技能提升到更高水平的 Rust 開發者。

目錄
1. 常見性能陷阱
2. 額外性能增強
3. Rust 中的記憶體管理
4. Lints 和 Clippy
5. 分析你的 Rust 應用程式
6. 基準測試
7. 內建宏和配置項目
8. 必備的宏庫
9. 創建自己的宏
10. 多執行緒
11. 非同步程式設計