Tag: Cache
8 posts
-
Redis Internals and Usage: The Event Loop, Encodings, RDB vs AOF, Replication and Cluster
Deep dive into Redis: single-threaded event loop, SDS and skiplist encodings, RDB vs AOF persistence, PSYNC replication backlog, Sentinel, Cluster.
-
Data Fetching with SWR: Revalidation, Mutations, Dependent Requests and Infinite Loading
Fetch data in React with SWR: cache keys, revalidation on focus, optimistic mutations, conditional and dependent requests, infinite loading and Next.js.
-
TanStack Query v5 in Practice: Query Keys, staleTime vs gcTime, Mutations and SSR Hydration
How TanStack Query v5 behaves: query keys as dependencies, staleTime vs gcTime, isPending vs isLoading, invalidation, optimistic rollback and SSR hydration.
-
C++ Performance Optimization: Measure First, Then Copies, Allocations, Cache and Compiler Flags
A measured approach to C++ performance: profile first, remove hidden copies, reserve allocations, fix memory access order, and use -O2/-O3, -march and LTO without the common traps.
-
Cache Eviction Beyond LRU: FIFO, Clock, Random and MRU in C++ with a Trace Simulator
FIFO, LRU, Clock, Random and MRU eviction implemented in C++ and replayed on the same traces: Bélády's anomaly, loops larger than the cache, scans and skew.
-
Cache-Friendly C++: Data-Oriented Design and AoS vs SoA
Data-oriented design for C++ performance: AoS vs SoA layout, cache lines, false sharing, alignas, benchmarking with perf, and ECS patterns for games.
-
C++ Cache Optimization: Locality, False Sharing, SoA vs AoS
Improve CPU cache efficiency in C++: spatial locality, matrix layout, struct packing, prefetching, blocking, false sharing, and alignment for SIMD.
-
Speeding Up Turborepo Builds: Cache Outputs, Task Graph, Remote Cache and Filtering
How to make Turborepo builds faster in practice: correct outputs and inputs, a lean task graph, environment variables in the cache key, Remote Cache, and running only affected packages in CI. Uses Turborepo 2.x turbo.json syntax.