Huasheng Li
Performance Optimization Engineer, ByteDance
Huasheng Li is a Senior Performance Optimization Engineer at ByteDance, an internal technical instructor, and the lead of a C++ high-performance foundational library project. He has long focused on high-performance foundational libraries, system performance optimization, and large-scale engineering practices, with deep expertise in server-side infrastructure components, resource efficiency, runtime performance optimization, and performance management for complex systems. He has led and contributed to multiple performance optimization initiatives for core business scenarios, driving the large-scale adoption of high-performance foundational library capabilities across various business lines. His work spans high-concurrency services, core infrastructure components, resource and cost optimization, and engineering governance, significantly improving system efficiency and resource utilization while delivering substantial cost benefits.
Topic
Deploying libc++ in ByteDance Data Centers: Implementation and Challenges(Joint Presentation)
ByteDance operates C++ services across tens of millions of CPU cores, which have long relied on libstdc++. Migrating these services to libc++ has delivered performance improvements of 5–10% across nearly all business workloads. This talk will introduce the large-scale migration process and the multidimensional challenges encountered along the way, including prebuilt libraries, differences between standard library implementations, toolchains, and compilation and build systems. It will also share practical experience with AI-assisted migration. Through a range of both performance improvement and regression cases, the session will further analyze performance characteristics and optimization opportunities in C++ standard libraries. Outline 1. The Current State of STL Usage in ByteDance Data Centers Prebuilt library ecosystem Compilation and build infrastructure 2. libc++ vs. libstdc++ 3. libc++ Migration: Implementation and Challenges Challenges introduced by prebuilt libraries Compatibility and stability challenges arising from differences between STL implementations Challenges for the compilation and build infrastructure In-depth analysis of performance improvements and regressions during the migration from libstdc++ to libc++ Practical experience with AI-assisted migration 4. The Internal Evolution and Development of libc++ at ByteDance Audience Takeaways Large-scale migrations from libstdc++ to libc++ remain relatively uncommon among major Internet companies in China. ByteDance completed the migration of its core services to LLVM in 2021, while continuing to use the GNU-based libstdc++ standard library. In 2026, to achieve greater performance gains and compatibility, ByteDance migrated from libstdc++ to libc++ based on LLVM 20. Through this process, the team accumulated extensive experience in deploying libc++ across large-scale production C++ workloads. Attendees will gain practical insights into how to successfully deploy libc++ across large-scale C++ services, including a comparison of libstdc++ and libc++, performance analysis, and an examination of issues arising from ABI differences. The session will also share advanced practices and experience from making in-depth modifications and optimizations to libc++.