Tag

Compiler Optimization

1 views collected around this technical thread.

Kuaishou Tech
Kuaishou Tech
Dec 30, 2024 · Cloud Native

Kuaishou System Software Team: Architecture, Innovations, and Performance Optimizations

This article presents an overview of Kuaishou's system software team, detailing its core value, challenges, the "Four Horizontal Four Vertical" architecture, JVM innovations such as transparent coroutines and checkpointing, advanced compilation techniques, kernel isolation for cloud‑native workloads, and extensive performance‑boosting strategies that have dramatically improved resource utilization and stability.

Cloud NativeCompiler OptimizationJVM
0 likes · 15 min read
Kuaishou System Software Team: Architecture, Innovations, and Performance Optimizations
DataFunSummit
DataFunSummit
Nov 7, 2024 · Backend Development

Understanding LLVM Instruction Scheduling Algorithms and Topological Sorting

This article explains the importance of instruction scheduling for modern CPU pipelines, describes dependency types, distinguishes dynamic and static scheduling, outlines LLVM's multiple scheduling phases and algorithms, and introduces the underlying topological‑sort technique used to improve compiler performance.

Compiler OptimizationInstruction SchedulingLLVM
0 likes · 10 min read
Understanding LLVM Instruction Scheduling Algorithms and Topological Sorting
Architecture Development Notes
Architecture Development Notes
Aug 15, 2024 · Fundamentals

How Go’s Compiler Shrinks Binaries with Dead Code Elimination

This article explains Go’s dead code elimination (DCE) optimization, demonstrates it with sample code, shows how to inspect compiled binaries using go tool nm, and discusses factors that affect DCE such as code complexity, compiler flags, and reflection, helping developers reduce binary size.

Binary SizeCompiler OptimizationDead Code Elimination
0 likes · 6 min read
How Go’s Compiler Shrinks Binaries with Dead Code Elimination
Baidu Geek Talk
Baidu Geek Talk
Dec 4, 2023 · Mobile Development

Compiler Optimization

The article details Baidu APP’s comprehensive compiler‑optimization strategy, including GCC‑Oz size reduction, Swift‑Osize with whole‑module optimization, link‑time optimization, symbol stripping, dead‑code removal, asset catalog compression, minimizing C++ virtual functions, slimming third‑party SDKs, dropping unused ARM architectures, Xcode 14 binary‑size tweaks, and eliminating built‑in Swift libraries by raising the minimum iOS version.

Compiler OptimizationLTOPerformance Tuning
0 likes · 16 min read
Compiler Optimization
ByteDance SYS Tech
ByteDance SYS Tech
Jun 9, 2023 · Backend Development

Why Strict Aliasing Matters: Deep Dive into LLVM TBAA and TypeSanitizer

This article explains the Strict Aliasing Rule, how compilers use Type‑Based Alias Analysis (TBAA) for optimization, demonstrates LLVM’s metadata‑based implementation, introduces the TypeSanitizer tool for detecting aliasing violations, and offers practical guidance to avoid common pitfalls in C/C++ code.

Compiler OptimizationLLVMSanitizer
0 likes · 33 min read
Why Strict Aliasing Matters: Deep Dive into LLVM TBAA and TypeSanitizer
Baidu Geek Talk
Baidu Geek Talk
Apr 10, 2023 · Mobile Development

iOS App Package Size Optimization: Necessity, Metrics, and Technical Solutions

Facing a 420 MB iOS bundle that hurt download conversion, Baidu APP launched a comprehensive size‑optimization project—covering compiler flags, image and resource slimming, code deduplication, and build‑architecture upgrades—that trimmed 50 MB (≈12 %) of the package, boosted conversion rates, and set a benchmark for industry‑wide iOS app size management.

App Size OptimizationCompiler OptimizationPackage Analysis
0 likes · 14 min read
iOS App Package Size Optimization: Necessity, Metrics, and Technical Solutions
ByteDance SYS Tech
ByteDance SYS Tech
Jan 6, 2023 · Fundamentals

How ByteDance Scaled Profile‑Guided Optimization to Boost CPU Efficiency

This article explains ByteDance's large‑scale adoption of profile‑guided optimization (PGO), covering its principles, instrumentation and sampling methods, the automated platform built for data collection and compilation, and the resulting performance gains across dozens of critical services.

ByteDanceCompiler OptimizationInstrumentation
0 likes · 12 min read
How ByteDance Scaled Profile‑Guided Optimization to Boost CPU Efficiency
Tencent Cloud Developer
Tencent Cloud Developer
Nov 2, 2022 · Fundamentals

C++ Performance Traps: Hidden Costs of Abstraction and Compiler Optimization Pitfalls

Modern C++ performance suffers when seemingly harmless abstractions—such as virtual functions, hidden copies, non‑trivial destructors, overused std::shared_ptr, type‑erasing wrappers, std::variant/optional, and std::async—prevent inlining and efficient memory use, while patterns like std::move on returns, hidden destructors in tail recursion, and branchy loops thwart NRVO, tail‑call, and auto‑vectorization optimizations.

C++Compiler OptimizationNRVO
0 likes · 16 min read
C++ Performance Traps: Hidden Costs of Abstraction and Compiler Optimization Pitfalls
Python Programming Learning Circle
Python Programming Learning Circle
Aug 15, 2022 · Fundamentals

Why Modern Programming Languages Have Dropped ++/-- Operators: A Design‑Philosophy Perspective

This article examines the historical origin of the ++ and -- operators, explains why they were introduced, demonstrates that modern compilers no longer gain performance from them, and argues that functional‑style design, iterator‑based loops, and operator‑overloading concerns have led many contemporary languages to remove or deprecate these operators.

C++Compiler OptimizationFunctional Programming
0 likes · 25 min read
Why Modern Programming Languages Have Dropped ++/-- Operators: A Design‑Philosophy Perspective
DaTaobao Tech
DaTaobao Tech
Jul 6, 2022 · Fundamentals

TypeScript 4.8 Beta Release: Key Features and Enhancements

TypeScript 4.8 beta, released June 21 2022, adds Stage‑3 decorator groundwork, tighter strict‑null narrowing, more precise template‑literal inference, disables binding‑pattern inference, warns literal === comparisons, and boosts watch/incremental/build performance, while introducing breaking changes to lib.d.ts and JSDoc type imports.

Breaking ChangesCompiler OptimizationTypeScript 4.8
0 likes · 10 min read
TypeScript 4.8 Beta Release: Key Features and Enhancements
Refining Core Development Skills
Refining Core Development Skills
Apr 1, 2022 · Fundamentals

Stack vs Heap Memory Allocation: Speed Comparison and Implementation Details

This article explains how memory allocation on the stack is faster than on the heap, demonstrates the process with assembly instructions, provides benchmark code comparing allocation speeds, discusses compiler optimizations, and outlines the differences, advantages, and pitfalls of stack and heap memory usage.

C++Compiler OptimizationHeap
0 likes · 9 min read
Stack vs Heap Memory Allocation: Speed Comparison and Implementation Details
GrowingIO Tech Team
GrowingIO Tech Team
Mar 3, 2022 · Mobile Development

Unveiling iOS AutoreleasePool Changes: TLS Magic and Compiler Optimizations

This article explores the evolution of the iOS main.m AutoreleasePool since Xcode 11, explains how Thread‑Local Storage and compiler optimizations like tail‑call elimination affect object lifetimes, and demonstrates practical code examples and assembly insights for developers seeking deeper memory‑management understanding.

AutoreleasePoolCompiler OptimizationTail Call Elimination
0 likes · 14 min read
Unveiling iOS AutoreleasePool Changes: TLS Magic and Compiler Optimizations
Tencent Cloud Developer
Tencent Cloud Developer
Feb 14, 2022 · Cloud Computing

Feedback‑Driven Compiler Optimizations for Cloud C/C++ Applications

The article shows how profiling‑driven compiler and OS techniques—such as sampling and instrumentation PGO, BOLT code layout, AutoFDO pipelines, basic‑block reordering, partial inlining, branch and function reordering—can alleviate instruction‑cache and front‑end stalls in large C/C++ cloud workloads, delivering up to 18 % performance gains.

C++Compiler OptimizationProfile Guided Optimization
0 likes · 16 min read
Feedback‑Driven Compiler Optimizations for Cloud C/C++ Applications
Architect's Tech Stack
Architect's Tech Stack
Nov 27, 2020 · Backend Development

When Does Java Use StringBuilder for String Concatenation?

This article investigates Java's string concatenation behavior, demonstrating through two examples why some concatenations invoke StringBuilder while others are optimized by the compiler, and explains the underlying bytecode differences revealed by decompiling with javap.

Compiler OptimizationJavaJavap
0 likes · 3 min read
When Does Java Use StringBuilder for String Concatenation?
Sohu Tech Products
Sohu Tech Products
Jul 17, 2019 · Mobile Development

Understanding Swift Object Creation, Method Dispatch, and Memory Layout – A C‑Style Pseudocode Exploration

This article explains how Swift objects are created and destroyed, how method calls are implemented compared with Objective‑C, the memory layout of Swift classes, the role of virtual tables, the impact of compiler optimizations, and the feasibility of runtime method replacement, illustrated with extensive C‑style pseudocode examples.

Compiler OptimizationMethod DispatchObject Model
0 likes · 34 min read
Understanding Swift Object Creation, Method Dispatch, and Memory Layout – A C‑Style Pseudocode Exploration
Tencent Database Technology
Tencent Database Technology
Dec 20, 2018 · Fundamentals

Unexpected Behavior with -O2 Optimization Due to Strict Aliasing Violations in C++

The article explains why a C++ program produces different outputs with and without the -O2 optimization flag, tracing the issue to strict aliasing violations caused by type‑punning pointer casts, and shows how disabling -fstrict-aliasing or using -fno‑strict‑aliasing resolves the problem.

C++Compiler OptimizationOptimization Flags
0 likes · 8 min read
Unexpected Behavior with -O2 Optimization Due to Strict Aliasing Violations in C++