更新时间:2021-08-27 19:59:42
封面
Title Page
Copyright and Credits
Rust High Performance
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
Common Performance Pitfalls
Asking the Rust compiler about performance
Optimizations
Build configuration
Optimization level
Debug information
Link-time optimizations
Debug assertions
Panic behavior
Runtime library paths
Translation issues
Indexing degradations
Using iterators
Iterator adaptors
Real-life example
Specialized adaptors
Interaction between adaptors
Itertools
Borrowing degradations
Cyclomatic complexity
Summary
Extra Performance Enhancements
Compile-time checks
Sequential state machines
Complex state machines
Real-life type system check example
Extra performance tips
Using closures to avoid runtime evaluation
Unstable sorting
Map hashing
Perfect hash functions
Standard library collections
Sequences
Maps
Sets
Memory Management in Rust
Mastering the borrow checker
Allocations
Mutability borrowing and owning
Lifetimes
Memory representation
Alignment
Complex enumerations
Unions
Shared pointers
The cell module
Cells
RefCell
The rc module
Lints and Clippy
Using Rust compiler lints
Lints
Avoiding anonymous parameters
Avoiding heap allocated box pointers
Avoiding missing implementations
Enforcing documentation
Pointing out trivial casts
Linting unsafe code blocks
Unused lints
Variant size differences
Lint groups
Clippy
Installation
Configuration
Casting
Bad practice
Performance lints
Unwraps
Shadowing
Integer overflow
Profiling Your Rust Application
Understanding the hardware
Understanding how the CPU works
Speeding up memory access with the cache
Cache misses