Tagged articles
4 articles
Page 1 of 1
Deepin Linux
Deepin Linux
Jul 24, 2025 · Fundamentals

Boosting Large-Scale std::vector Performance: Memory, Moves, and SIMD

This article examines why std::vector can become a bottleneck when handling millions of elements, analyzes memory consumption, insertion/deletion costs, and cache behavior, and presents practical optimizations such as pre‑allocation, move semantics, SIMD vectorization, and cache‑friendly designs illustrated with real‑world case studies and code examples.

CMemory OptimizationSIMD
0 likes · 21 min read
Boosting Large-Scale std::vector Performance: Memory, Moves, and SIMD
Deepin Linux
Deepin Linux
Jul 3, 2025 · Fundamentals

Mastering std::vector: From Basics to Interview‑Level Implementation

This article walks through the fundamentals of C++'s std::vector, covering its basic concepts, common use cases, detailed implementation of key operations like push_back, pop_back, and iterators, deep source‑code analysis, and practical interview strategies for hand‑coding the container.

CData StructuresInterview
0 likes · 18 min read
Mastering std::vector: From Basics to Interview‑Level Implementation
Deepin Linux
Deepin Linux
Jun 23, 2025 · Fundamentals

Mastering std::vector: From Basics to Deep Implementation Insights

This article recounts a challenging Pinduoduo C++ interview question to hand‑write std::vector, then thoroughly explains its basic concepts, core interfaces, memory management, iterator behavior, source‑code analysis, and interview strategies, providing code examples and practical tips for mastering this essential container.

CData Structuresstd::vector
0 likes · 18 min read
Mastering std::vector: From Basics to Deep Implementation Insights
Liangxu Linux
Liangxu Linux
Jun 16, 2025 · Fundamentals

Where Does a C++ vector Live? Stack, Heap, or Global Memory Explained

This article clarifies whether a C++ vector object resides on the stack, heap, or in static storage, explains that its elements are almost always allocated on the heap, covers special cases like small‑vector optimization, and provides interview‑ready answers with sample code and memory‑location experiments.

C++HeapInterview
0 likes · 12 min read
Where Does a C++ vector Live? Stack, Heap, or Global Memory Explained