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

Map is implementation in STD C is a Tree #322

Open
Shymaa-Arafat opened this issue Sep 19, 2021 · 0 comments
Open

Map is implementation in STD C is a Tree #322

Shymaa-Arafat opened this issue Sep 19, 2021 · 0 comments

Comments

@Shymaa-Arafat
Copy link

Shymaa-Arafat commented Sep 19, 2021

Just thought you Utreexo developers team should know that
https://www.tutorialspoint.com/cpp_standard_library/map.htm
https://codeforces.com/blog/entry/70947

To re-check if this is the best choice for your problem requirements

Sorry if I'm kind of pushing, but I think this is so important to know & think about the sooner the better before u go further in coding

In my understanding you didn't just kept a pointer or 2 when u could've removed them, u added another tree to storage which is either RBT or BST I'm not sure but in any case it's what existed before Utreexo & u originally made the forest to avoid it?

They say unordered map is stored as a hash table which could be better, but I don't know how better because any hash table implementation trade time with storage or not Optimized for space

Here's another confirmation an interview with the library designer
https://m.slashdot.org/story/212481
(got it from here
https://cs.stackexchange.com/questions/144045/how-c-and-alike-maps-are-actually-stored-in-memory/144067?noredirect=1#comment304155_144067)

the designer when asked about his regrets/2nd thoughts
"For example, an in-memory B*-tree is a far better choice than a red-black tree for implementing an associative container"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant