Tagged articles
22 articles
Page 1 of 1
Cognitive Technology Team
Cognitive Technology Team
Jul 20, 2025 · Fundamentals

How False Sharing Slows Java Programs and How to Eliminate It

This article explains what false sharing is in Java, how cache lines and cache‑line invalidation cause performance penalties, and provides concrete code examples and @Contended annotation techniques to detect and fix false sharing for faster multithreaded applications.

CacheContendedconcurrency
0 likes · 10 min read
How False Sharing Slows Java Programs and How to Eliminate It
JD Tech Talk
JD Tech Talk
Jul 1, 2025 · Fundamentals

How False Sharing Slows Down Multithreaded Java Apps—and How to Fix It

This article explains the hidden performance killer of cache false sharing in multicore Java applications, demonstrates its impact with benchmark code, and shows how padding, the @Contended annotation, and Caffeine's internal structures can eliminate the issue for faster execution.

CaffeineContendedJava concurrency
0 likes · 10 min read
How False Sharing Slows Down Multithreaded Java Apps—and How to Fix It
JD Cloud Developers
JD Cloud Developers
Jul 1, 2025 · Fundamentals

How False Sharing Slows Your Java Apps and How to Eliminate It

This article explains the cache architecture behind false sharing, demonstrates its dramatic performance impact with benchmark code, and shows how Java's @Contended annotation and Caffeine's memory‑padding techniques can effectively eliminate the issue for high‑concurrency applications.

cache optimizationfalse sharingperformance tuning
0 likes · 10 min read
How False Sharing Slows Your Java Apps and How to Eliminate It
dbaplus Community
dbaplus Community
Dec 22, 2024 · Fundamentals

Why Row‑Major Traversal Beats Column‑Major: Unveiling Cache, Prefetch, and False‑Sharing Secrets

This article builds a practical hardware‑mind model by benchmarking Rust code to show how cache layout, prefetching, cache associativity, false sharing, pipeline stalls, and data dependencies affect the performance of row‑major versus column‑major traversals, random accesses, and multithreaded loops, and it offers concrete fixes such as cache‑line alignment.

CPU architecturePipelineRust
0 likes · 19 min read
Why Row‑Major Traversal Beats Column‑Major: Unveiling Cache, Prefetch, and False‑Sharing Secrets
Go Programming World
Go Programming World
Jul 4, 2024 · Fundamentals

Understanding False Sharing and Cache Padding in Go

This article explains the concept of false sharing caused by CPU cache line interactions, demonstrates how cache padding can mitigate the performance penalty, and provides Go benchmark code and results to illustrate the impact on multi‑core concurrency.

Golangcache paddingconcurrency
0 likes · 8 min read
Understanding False Sharing and Cache Padding in Go
Tencent Cloud Developer
Tencent Cloud Developer
Apr 25, 2024 · Fundamentals

Cache, Prefetching, False Sharing, Pipeline and Data Dependency: Performance Optimization in Rust

The article uses Rust benchmarks to show how cache layout, prefetching, associativity, false sharing, pipeline stalls, and loop data dependencies impact performance, and demonstrates practical optimizations such as row‑major traversal, proper alignment, avoiding dependent loops, and leveraging sequential access to achieve near‑optimal speed.

CPU cacheRustdata dependency
0 likes · 17 min read
Cache, Prefetching, False Sharing, Pipeline and Data Dependency: Performance Optimization in Rust
Tencent Technical Engineering
Tencent Technical Engineering
Apr 2, 2024 · Fundamentals

Cache, Prefetching, False Sharing, Pipeline, and Data Dependency: Benchmarks and Optimizations in Rust

The article shows how row‑major vs column‑major traversal, random access, cache‑set conflicts, false sharing, branch‑prediction failures, and loop‑carried data dependencies each degrade performance by tying Rust (and C++) code patterns to CPU cache behavior, prefetching, pipeline stalls, and vectorization limits, demonstrated through runnable benchmarks.

CPU cachePipelineRust
0 likes · 15 min read
Cache, Prefetching, False Sharing, Pipeline, and Data Dependency: Benchmarks and Optimizations in Rust
Liangxu Linux
Liangxu Linux
Jun 23, 2023 · Fundamentals

Understanding CPU Cache Consistency: MESI Protocol, Performance Tips & Code Examples

Cache consistency spans icache‑dcache synchronization, multi‑CPU cache coherence, and device‑CPU interactions; the article explains the MESI protocol, demonstrates performance impacts with multithreaded code, explores prefetching, false sharing, mapping strategies, and practical tips for writing cache‑aware software.

CPUCacheCoherence
0 likes · 24 min read
Understanding CPU Cache Consistency: MESI Protocol, Performance Tips & Code Examples
Selected Java Interview Questions
Selected Java Interview Questions
Dec 7, 2022 · Backend Development

Understanding Java Disruptor: Queues, Core Components, and High‑Performance Lock‑Free Design

This article introduces various Java queue implementations, explains the Disruptor framework’s architecture, demonstrates its usage with complete code examples, and analyzes core components such as RingBuffer, Sequencer, and WaitStrategy while addressing performance issues like false sharing and multi‑producer coordination.

DisruptorRingBufferconcurrent queue
0 likes · 12 min read
Understanding Java Disruptor: Queues, Core Components, and High‑Performance Lock‑Free Design
Su San Talks Tech
Su San Talks Tech
Jul 4, 2022 · Fundamentals

Understanding CPU Cache False Sharing and How to Eliminate It

This article explains the concept of CPU cache false sharing, how it degrades performance on multi‑core systems, and provides practical techniques—including cache‑line alignment macros and padding strategies—to prevent it and improve multithreaded application efficiency.

CPU cachecache linefalse sharing
0 likes · 10 min read
Understanding CPU Cache False Sharing and How to Eliminate It
Top Architect
Top Architect
Feb 1, 2022 · Fundamentals

Understanding CPU Cache Hierarchy, Cache Coherence, and Performance Optimization

This article explains the structure of modern CPU caches, the principles of cache lines, associativity, and coherence protocols, and demonstrates how these hardware details affect program performance through multiple code examples covering loop stride, matrix traversal, multithreading, and false sharing.

CPU cacheMemory Hierarchycache coherence
0 likes · 21 min read
Understanding CPU Cache Hierarchy, Cache Coherence, and Performance Optimization
ITPUB
ITPUB
Jun 27, 2021 · Fundamentals

How Multi‑Level Caching Boosts Performance and Avoids Common Pitfalls

This article explores the role of multi‑level caching—from distributed and local caches to direct memory and CPU cache—detailing performance gains, cache‑miss handling, consistency challenges, false sharing issues, and practical mitigation techniques such as approximate LRU, random TTL, delayed double‑delete, padding, and lock‑free designs.

CPU cacheCache ConsistencyMemory Management
0 likes · 13 min read
How Multi‑Level Caching Boosts Performance and Avoids Common Pitfalls
JavaEdge
JavaEdge
Oct 8, 2020 · Backend Development

How Disruptor Achieves Lock-Free Speed: Single-Threaded Writes, Memory Barriers, and False Sharing

This article explains how the Disruptor library attains true lock‑free performance through single‑threaded writes, the use of memory barriers (volatile and happens‑before semantics), cache‑line alignment to eliminate false sharing, and a sequence‑barrier algorithm, providing code examples and practical optimization tips.

DisruptorJava concurrencyfalse sharing
0 likes · 5 min read
How Disruptor Achieves Lock-Free Speed: Single-Threaded Writes, Memory Barriers, and False Sharing
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
May 19, 2020 · Backend Development

Can You Build a Faster Counter Than Java’s LongAdder? A Deep Dive

An in‑depth Java performance study explores LongAdder, compares it with AtomicLong and lock‑based counters using JMH, and walks through successive custom implementations (V0‑V5) that apply striping, modulo optimization, false‑sharing elimination, and advanced hash probing to approach or surpass LongAdder’s throughput.

JMHJava concurrencyfalse sharing
0 likes · 16 min read
Can You Build a Faster Counter Than Java’s LongAdder? A Deep Dive
JavaEdge
JavaEdge
Jan 9, 2020 · Fundamentals

Why False Sharing Slows Your Java Programs and How to Eliminate It

False sharing occurs when multiple threads modify variables that reside on the same CPU cache line, causing unnecessary cache coherency traffic; this article explains cache line basics, CPU cache hierarchy, MESI protocol, and presents Java solutions—including padding, @sun.misc.Contended annotation, and JVM flags—to prevent performance degradation.

Java concurrencyMESIcache line
0 likes · 9 min read
Why False Sharing Slows Your Java Programs and How to Eliminate It