Tags

12 pages

C++

C++ Function Call Latency

Designed a行情 SDK, implementing different callback function implementations, and performed an extensive test. Recently I’ve been looking into C++ function programming, where functions have become first-class citizens, flowing within the program internally – what’s the difference in performance?

Previous article link: Compiler, Callback Functions, Performance Testing leimao大佬 also did similar tests, so I borrowed their code.

C11: sleep for vs yield

While reviewing the code, std::this_thread::yield() suddenly popped into my view, a syntax sugar from C11 that I’d used quite a bit, but hadn’t noticed before.

Why Do We Need to Learn a New Language?

Starting from my academic years, I’ve been working with C++ for over ten years. So, why do I need to learn other programming languages? Work experience: Lacking experience in elegant module design, C++ syntax is freeform. Learning other languages helps me guide the development of more elegant designs. I often use them when writing some tools. The design principles for low-level libraries and business modules are also becoming clearer.

Standard Library Container Memory Allocators: allocator

A custom allocator can improve performance, increase memory utilization efficiency, and address the issue of frequent, small memory allocations. Antecedent Recently, I’ve been working on the development of network data packets, requiring frequent allocation and release of small blocks of memory. Initially, I considered using a memory pool, reviewing several existing ones and discovering this: https://github.com/cacay/MemoryPool When looking at the interface, I was quite puzzled by how the memory pool’s implementation was a bit strange.