# swisstable **Repository Path**: xiuye_engineer/swisstable ## Basic Information - **Project Name**: swisstable - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-25 - **Last Updated**: 2025-10-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # swisstable Implement the UnorderedMap and UnorderedSet containers based on Swisstable, has the same interface as STL(support mostly), and is 2 to 1000 times faster than STL. The implementation is more concise than the official one, and you can directly include the header file to use. ## compile `g++ -O2 -std=c++17 ./perf_test.cpp -o perf_test` ## performance test
x86_64
- cpu: 16 Intel(R) Xeon(R) Gold 6161 CPU @ 2.20GHz
- memory: 64G
ARM
- cpu: Neoverse N2
- memory: 32G
insert x86 insert arm insert
find x86 find arm find
erase x86 erase arm erase
clear x86 clear arm clear
iterate x86 iterate arm iterate
## usage ```c++ #include "swisstable.h" int main() { UnorderedMap m; for (size_t i = 0; i < 100; ++i) { m.try_empace(i, i); } for (size_t i = 0; i < 100; ++i) { m.find(i); } size_t sum = 0; auto cal_sum = [&sum](HashPair &pair) { sum += pair.second; }; map.ctraverse(map.cbegin(), map.cend(), cal_sum); for (size_t i = 0; i < 100; ++i) { m.erase(i); } } ``` ## TODO ### merge c++20 pr