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

Todo: Rewrite all C++ containers. #579

Open
trcrsired opened this issue Feb 11, 2024 · 0 comments
Open

Todo: Rewrite all C++ containers. #579

trcrsired opened this issue Feb 11, 2024 · 0 comments

Comments

@trcrsired
Copy link
Member

trcrsired commented Feb 11, 2024

Initially, I believed that C++ containers posed fewer challenges compared to C++ IO. However, my perspective has shifted after working with fast_io.

Contrary to my previous assumption, C++ containers present significant issues, particularly in compatibility with fast_io. Numerous examples highlight this:

Not Freestanding C++ containers lack the freestanding capability necessary for integration with fast_io.
Microsoft's Flawed Implementation of std::deque MSVC STL mishandles std::deque, which is actually a crucial and faster container than vector for push_back operations and iteration. This results in overall performance degradation.
Restrictive Allocator Model The allocator model's type constraints prevent containers from efficiently merging different types at the binary level.
Inefficient Implementation of list The presence of size() in the list container renders it practically useless in certain scenarios.
Absence of B-tree The lack of a built-in B-tree structure limits the versatility and efficiency of C++ containers.
Lack of Ranked Tree Support Ranked tree functionality is notably absent, further limiting the capabilities of C++ containers.
Exception Handling Overuse Overreliance on exception handling for error management complicates container usage.
Pointless Features like pmr Features like pmr (polymorphic memory resources) prove to be convoluted and offer minimal practical utility, adding unnecessary complexity.
Absence of Interface For instance, while vector lacks a method like push_back_unchecked, deque lacks a mechanism to access its internal buckets directly

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