Tagged articles
GCD
13 articles · Page 1 of 1
The article details how the open‑source Flash‑MoE engine streams a 400‑billion‑parameter Mixture‑of‑Experts language model on an iPhone 17 Pro, achieving interactive‑level token throughput by eliminating Python dependencies, crafting a custom Metal pipeline, and streaming weights directly from SSD.
Apple SiliconFlash-MoEGCD
0 likes · 7 min read

The article analyses a recurring crash in an iOS driver app caused by the __dispatch_barrier_waiter_redirect_or_wake function in libdispatch, explains the EXC_BREAKPOINT/SIGTRAP mechanism, compares libdispatch versions, reveals a premature queue release due to non‑atomic reference‑count handling, and proposes replacing GCD‑based barriers with pthread_rwlock_t to eliminate the bug.
BarrierGCDReferenceCounting
0 likes · 15 min read

An insightful story warns against cutting valuable talent, followed by a detailed Java solution that inserts the greatest common divisor between each pair of nodes in a singly linked list, complete with algorithm explanation, code, complexity analysis, and edge‑case handling.
GCDInterviewJava
0 likes · 6 min read

Given two positive integers n and k, construct an array of n distinct numbers whose greatest common divisor is k and whose total sum is as small as possible, then output that minimal sum.
AlgorithmComplexityGCD
0 likes · 5 min read

This article walks through a Python community member's question about using NumPy to find the greatest common divisor of a comma‑separated list of numbers and then dividing each number by that GCD, showing the debugging process, code corrections, and final working solution.
GCDNumPyPython
0 likes · 5 min read

By analyzing thread preemption on low‑end iPhones, this article demonstrates how selecting appropriate GCD queue QoS levels—favoring Utility or Background over User‑Initiated—reduces main‑thread contention, improves launch screen rendering by ~100 ms, and accelerates message list first‑load by up to 1.5 s without altering business logic.
ConcurrencyGCDQoS
0 likes · 10 min read

This article explains how the HLL iOS driver team identified excessive global‑queue usage, thread‑switch overhead, deadlocks and UI‑thread violations, then introduced a priority‑aware queue pool, refined concurrency controls, and built long‑term monitoring to dramatically reduce crashes and improve performance.
GCDThread Managementcrash reduction
0 likes · 13 min read

This article explains the classic water‑jug interview problem using two cups of 9 L and 15 L, derives the reachable volumes via greatest‑common‑divisor logic, and provides complete C++ code to determine feasibility and output the pouring steps for any target volume.
AlgorithmGCDSimulation
0 likes · 6 min read

This article explores the intricacies of Grand Central Dispatch on iOS, debunking common misconceptions about main thread and main queue execution, analyzing the internal handling of synchronous tasks, and demonstrating how run‑loop activation influences queue‑thread relationships through a series of code experiments.
GCDasyncdispatch_queue
0 likes · 14 min read

The article clarifies frequent iOS development misconceptions—from unnecessary observer removal and deprecated NSUserDefaults synchronization to block retain‑cycle tricks, responder‑chain versus hit‑testing differences, GCD queue optimizations, safe main‑queue detection, and proper cancellation of dispatch blocks—offering practical code guidance.
GCDObjective-C++UIKit
0 likes · 17 min read

This article explains the three main iOS timer mechanisms—NSTimer, CADisplayLink, and GCD dispatch sources—detailing their creation methods, differences, common pitfalls such as RunLoop mode and thread issues, and practical solutions for accurate scheduling.
CADisplayLinkGCDNSTimer
0 likes · 14 min read

This article explains how to analyze and improve iOS app performance by understanding time‑complexity impacts, leveraging GCD for asynchronous work, preventing thread explosion, optimizing I/O and memory usage, and using low‑level techniques such as stack tracing, symbolication, and objc_msgSend hooking.
GCDMethodHookingThreadMonitoring
0 likes · 22 min read

This article explains why iOS apps experience lag due to main‑thread blocking, demonstrates the problem with sample code, and provides practical solutions using GCD and monitoring tools like Bugly to keep the UI responsive and improve user satisfaction.
BuglyGCDLAG
0 likes · 6 min read
