原始笔记是几条零散记录,这里只做分节整理,原始信息基本保留。
crc32 的目标平台
folly 主要针对 aarch64(Android、Linux)和 x86_64 进行优化。
ceph 针对 arm、aarch64、x86_64 优化(见 simd.cmake 文件)。
阅读时如果想找 SIMD 相关入口,可以从两边的 simd.cmake / 各自 arch 目录下手。
memcpy / memset 的实现
针对 x86_64 / aarch64 都做了优化:
- x86_64 下用 memcpy.S,hook 了 memcpy。
- aarch64 下用 memcpy_select_aarch64.cpp,hook 了 memcpy。
编译
folly 推荐用自带的 getdeps.py 拉依赖并构建:
python3 ./build/fbcode_builder/getdeps.py \
--allow-system-packages \
--scratch-path /home/ubuntu/folly_install \
build
--scratch-path 指定中间产物和依赖落盘位置,方便清理。
barrier.h
待补:当时只标了文件名,还没整理细节。后续可以围绕 folly 的同步原语(Barrier、Baton、SaturatingSemaphore 等)一起整理。
后续可补的方向
- folly 中常用 helper(
Function、Optional、Expected等)的速查 - folly + jemalloc / mimalloc 的搭配建议
- 在自己工程里以源码方式集成 folly 的最小可行 CMake 配置
FEATURED TAGS
Git
Cheat Sheet
Markdown
Tools
C++
Linker
Thread
Linux
TCP
Network
GDB
Debug
leetcode
链表
WSL
Ubuntu
Windows
Linux Kernel
GCC
Android
adb
Troubleshooting
Profiling
Sanitizer
glibc
MySQL
Database
Python
curl
Build
ELF
clang-format
CMake
Graphviz
Performance
vcpkg
Protobuf
排查
速查
内存
STL
调试
性能分析
性能
读书笔记
方法论
架构
网络
Timer
mbedTLS
TLS
安全
负载均衡
脚本
工具
LRU
二叉树
BST
中序遍历
回溯
二分查找
优先队列
排序
旋转数组
jenkins
部署