Skip to content

wery0/set-implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

set-implementation

This is properly tested std::set implementation, based on self-balansing AVL-tree.

It supports standart std::set operations in guaranteed O(log(n)).

Benchmarks

Benchmark was compiled with g++ -std=c++17 -O2.

Insert

Insert benchmarks

About 1.5 times slower.

Insert erase

Insert_erase benchmarks

About 1.6 times slower.

Lower_bound

Lower bound benchmarks

About 3% faster in average.

Memory

Memory difference is negligible (less than 0.03 MB per 1e6 elements), which is understandable due to equal amount of information, storing in each node (left, right child pointers, parent pointer, and data themselves).

About

std::set analogue, based on AVL tree.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published