folly::UnboundedQueue — 동적 크기 lock-free
Part 10-03: UnboundedQueue — linked segment 기반 동적 크기 lock-free 큐. SPSC 모드에선 거의 무비용으로 성장한다.
219개의 포스트 · 6/10 페이지
Part 10-03: UnboundedQueue — linked segment 기반 동적 크기 lock-free 큐. SPSC 모드에선 거의 무비용으로 성장한다.
Part 10-02: MPMCQueue — ticket 기반 lock-free 큐. CAS 없이 여러 producer/consumer를 안전하게 처리한다.
Part 10-01: ProducerConsumerQueue — SPSC lock-free ring buffer. cache line padding, acquire/release만으로 RTT을 줄이는 패턴.
PicoSpinLock — integer type의 한 bit을 lock으로 사용. 객체 안에 lock을 끼워 넣어 메모리 절약.
folly::RWSpinLock — spin-only reader-writer lock, 매우 짧은 critical section에 SharedMutex보다 빠르다.
folly::Baton — 한 번 post, 한 번 wait의 경량 signal primitive. condition variable보다 가볍다.
folly::SharedMutex — std::shared_mutex보다 작고 빠른 reader-writer lock, fairness 정책 선택.
folly::Synchronized<T> — 데이터와 lock을 한 객체에 묶어 잠금 누락을 컴파일 타임에 막는다.
EvictingCacheMap — 고정 size 한도와 LRU eviction policy를 결합한 single-thread cache.
ConcurrentHashMap — sharded buckets + Hazard Pointer로 erase 포함 full thread-safe hash map.
AtomicHashMap — lock-free read, append-only insert, 큰 read-heavy 워크로드용 hash map.
FixedString — fixed capacity, fully constexpr 문자열 type. compile-time concat과 hash가 가능.
small_vector — N개까지 inline 저장, overflow는 heap, std::vector 호환 인터페이스.
F14 chunk 구조와 SIMD probing — SSE2/AVX/NEON dispatch, H1/H2 hash split, 14-slot 선택 이유.
F14FastMap — key/value 크기로 ValueMap과 VectorMap 중 자동 선택, 사용자 trade-off 제거.
F14VectorMap — value를 contiguous vector에 두고 chunk에는 index만, 순회 cache-friendly.
F14NodeMap — value를 별도 heap node에 두어 pointer/reference 안정성을 보장하는 F14 변형.
F14ValueMap의 in-place value 저장과 std::unordered_map node-based의 차이, 성능과 reference 안정성.
folly::to의 성능 — lookup table itoa, SWAR atoi, sprintf/iostream과의 5-10배 차이.
folly::to에 사용자 타입을 hook하기 — parseTo, toAppend ADL 확장.
folly::to의 throw-on-error 변환, tryTo의 Expected 반환, 양방향 string/number 처리.
folly::join과 folly::split의 구현, StringPiece 기반 zero-copy split, absl::StrSplit 비교.
StringPiece의 역사적 배경, std::string_view와의 호환 layer, Range<const char*>로서의 일반화.
Folly가 fmt 라이브러리를 채택한 이유, formatter customization, sformat/format 차이.