Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flat containers (flat_set & flat_map) #32

Closed
samchon opened this issue Mar 1, 2019 · 2 comments
Closed

Flat containers (flat_set & flat_map) #32

samchon opened this issue Mar 1, 2019 · 2 comments
Labels
C++20 enhancement New feature or request experimental Experimental Feature help wanted Extra attention is needed
Projects

Comments

@samchon
Copy link
Owner

samchon commented Mar 1, 2019

Flat containers are based on array.

Ordinary tree (associative) containers like TreeMap or TreeMultiSet, they store elements in a doubly-linked-list and nodes (iterators) of the doubly-linked-list are stored in a binary tree. It makes binary search & bidirectional iteration possible at the same time (B+Tree).

New flat containers, they store elements in array. They do not implement binary search through binary tree, but by using sorting and binary search functions in <algorithm> module.

Type TreeMap FlatMap
Search O (log n) O (log n)
Insert O (log n) O (n*log n)
Erase O (1) O (n)
Iteration Bidirectional Random Accessible
@samchon samchon added this to To do in v2.2 Update via automation Mar 1, 2019
@samchon samchon added the C++20 label Mar 1, 2019
@samchon samchon changed the title flat_set & flat_map flat adaptor containers Apr 6, 2019
@samchon samchon moved this from To do to In progress in v2.2 Update Apr 6, 2019
@samchon
Copy link
Owner Author

samchon commented Apr 6, 2019

@samchon samchon changed the title flat adaptor containers flat associative containers (flapt_set & flat_map) Apr 6, 2019
@samchon samchon added enhancement New feature or request experimental Experimental Feature labels Apr 6, 2019
@samchon samchon changed the title flat associative containers (flapt_set & flat_map) Flat containers (flat_set & flat_map) Apr 6, 2019
@samchon samchon moved this from In progress to Done in v2.2 Update Apr 6, 2019
@samchon
Copy link
Owner Author

samchon commented Jun 15, 2019

Have implemented until v2.2 update.

Flat containers are candidate features in C++20, however, it's not determined yet. It even can be rejected in final C++20 committee and don't know whether those flat containers would be adapted in standard or experimental.

If someone recognizes final determination of C++20 committee about flat containers faster than me, please inform me.

@samchon samchon closed this as completed Jun 15, 2019
@samchon samchon reopened this Jun 15, 2019
v2.2 Update automation moved this from Done to In progress Jun 15, 2019
@samchon samchon added the help wanted Extra attention is needed label Jun 15, 2019
@samchon samchon moved this from In progress to Done in v2.2 Update Jun 16, 2019
@samchon samchon closed this as completed Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++20 enhancement New feature or request experimental Experimental Feature help wanted Extra attention is needed
Projects
No open projects
v2.2 Update
  
Done
Development

No branches or pull requests

1 participant