Tag

zero-cost abstraction

1 views collected around this technical thread.

Tencent Cloud Developer
Tencent Cloud Developer
Nov 2, 2022 · Fundamentals

C++ Performance Traps: Hidden Costs of Abstraction and Compiler Optimization Pitfalls

Modern C++ performance suffers when seemingly harmless abstractions—such as virtual functions, hidden copies, non‑trivial destructors, overused std::shared_ptr, type‑erasing wrappers, std::variant/optional, and std::async—prevent inlining and efficient memory use, while patterns like std::move on returns, hidden destructors in tail recursion, and branchy loops thwart NRVO, tail‑call, and auto‑vectorization optimizations.

CCompiler OptimizationNRVO
0 likes · 16 min read
C++ Performance Traps: Hidden Costs of Abstraction and Compiler Optimization Pitfalls
High Availability Architecture
High Availability Architecture
May 9, 2020 · Fundamentals

Zero‑Cost Abstractions: Principles, Benefits, and Rust Examples

The article explains the concept of zero‑cost abstractions, their two core requirements of no global overhead and optimal performance, adds a third focus on developer experience, and illustrates these ideas with Rust’s ownership model, iterators, async/await, and unsafe modules.

Async/AwaitPerformanceRust
0 likes · 9 min read
Zero‑Cost Abstractions: Principles, Benefits, and Rust Examples