Rico's Nerd Cluster

「离开世界之前 一切都是过程」

Bash Magic

Bash is great. Here is a list of bash tricks & knowledge points that I found magical

Builtins Test [[ -n STRING ]] - returns true when STRING is not empty [[ -z STRING ]] - returns true when STRING is empty equivalent to [[ ! -n STRING ]] [[ -d FILE ]] -...

C++ - [Concurrency 6] Memory Model

Introduction The C++ memory model was formally introduced in C++11 mainly for multithreading. Before C++11: Threading was platform-dependent. (POSIX threads for Unit systems) Behavior of sh...

C++ - [Concurrency 5] Coroutine

Coroutine Coroutines in C++ allows us to write asynchronous code in a sequential style. It allows us to resume and suspend, instead of blocking a thread. A coroutine by default is single-threaded,...

C++ - [Concurrency 4] Various Concurrent Methods

Asynchonous Programming, Vectorization, `std::launch`, Lockless array writes, OpenMP, SIMD, SSE2

Asynchronous Programming Single-Threaded Asynchornous Programming Cooperative Multitasking & Pre-emptive Multitasking This is a model where each task voluntari...

C++ - [Concurrency 3] Promise, Future, Packaged_Tasks

promise <> future; packaged_tasks

C++ - [Concurrency 2] Conditional Variables

Conditional Variables

Conditional Variables

Threading Motivation: Why C++ Concurrency Matters Standardized concurrency arrived with C++11, replacing the ad-hoc C / compiler-specific APIs used before C++98 with a formal memory model. Key l...

C++ - [Memory Access - 1] Layout

Cache

Memory Access: The Hidden Bottleneck Reference Why Memory Access Matters Even as CPU speeds continue to improve, the cost of fetching data from memory has become a limiting factor. Operating sys...

C++ Tool Websites

CppInsights, Compiler Explorer, Conan

CppInsights CppInsights does these things: how the standard library objects (like stringstream, vector, etc.) get instantiated how overloaded operators are actually resolved. 1 2 3 4 5 6 7...

C++ Profiling and Speed Ups

gprof, perf, CMake Release and Debug BoilerPlate, CMake Settings

Gprof GNU gprof provides CPU execution times (not wall time, so sleep is not accounted for) of functions and their subfunctions in percentage. Gprof outputs data in a text-based format, which can ...