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

Feature/containers pt2 btree #21

Merged
merged 49 commits into from
Oct 28, 2024
Merged

Feature/containers pt2 btree #21

merged 49 commits into from
Oct 28, 2024

Conversation

psiha
Copy link
Owner

@psiha psiha commented Sep 27, 2024

No description provided.

- implemented support (emulation) for unmapping views expanded by concatenation
- fixed NTSTATUS type definition
- added a minor sanity check.
Build:
 - added PCH usage
 - updated dependencies.
@psiha psiha force-pushed the feature/containers_pt2_btree branch from c0fa2d7 to 9803817 Compare September 27, 2024 22:26
… overloads for parent_nodes.

Fixes for various compilation warnings and errors.
Minor cleanups.
@psiha psiha force-pushed the feature/containers_pt2_btree branch from 9803817 to 7924f16 Compare September 27, 2024 23:27
@psiha psiha force-pushed the feature/containers_pt2_btree branch from 25e9764 to dc410d8 Compare September 28, 2024 11:35
…dren counts (and how it relates to node splitting and merging).
… semantics).

Fixed a bug in bptree_base::free().
Minor other stylistic changes.
- all node types at all levels form horizontal/breadth doubly linked lists
- precise in-parent-position for child nodes is tracked (simplifying other code and eliminating the need for binary searches in a couple of places).
Added testing for pure in-memory operation.
Various related refactoring, cleanups ando optimizations.
Linux: fixed compiler warnings and linker errors.
…ar search might be faster than binary search.

Moved more shared/duplicated logic up into find_nodes_for().
… (quick-fix for sporadic failures on an 8GB Win11 machine).
Improved the iterators implementation:
 - support decrementable end iterators
 - optimized decrement operators.
Fixed public bptree::find() not to crash on empty bptrees.
Fixed bptree_base::reserve() to take into account existing capacity/free nodes.
Expanded the unit test.
Minor other related cleanups.
Decreased test data size (to avoid timeouts on GitHub).
@psiha psiha force-pushed the feature/containers_pt2_btree branch from 59ba2bb to c6b3134 Compare October 11, 2024 13:21
…mous mappings that cannot be done in-place.

Linux: disabled/excluded the POSIX fallback in-case-mremap-fails (relying solely on mremap now).
@psiha psiha force-pushed the feature/containers_pt2_btree branch from 5848cbe to fae4dd5 Compare October 13, 2024 20:47
psiha added 3 commits October 14, 2024 00:10
…sion (with relocation) does not destroy the preexisting contents.
…() (now that there is no fallback for mremap we have to add explicit handling of initial mapping with an explicit/special-cased mmap call).
@psiha psiha force-pushed the feature/containers_pt2_btree branch from fae4dd5 to cca72fc Compare October 13, 2024 22:18
Fixed a (node) leak in the bulk version of insert().
Fixed logic in insert (and the new merge) for maintaining the minimum-number-of-children-per-node rule (at the beginning and end of the bulk_append phase).
Changed unlink_node() to also free the node.
@psiha psiha force-pushed the feature/containers_pt2_btree branch from e366c26 to cb21b2b Compare October 17, 2024 12:29
psiha added 12 commits October 17, 2024 16:06
…tomatic optimal ABI).

Support for bulk insert from non-contiguous containers.
Added the find_next() helper function to speedup bulk operations (and in the future enable hinted-insertion like operations).
Added lower_bound() method.
Separate reserve and reserve_additional methods.
Minor work on supporting non-trivial types.
Added hinted insert().
Minor related cleanups and refactoring.
Added the get_contiguous_span_and_move_to_next_node() 'extended' member function to iterators to ease implementing efficient algorithms w/o further breaking encapsulation.
…st end 'pointers'.

Moved more leaf node deallocation bits up into base classes.
Fixed end() to work with empty containers.
Fixed bptree_base_wkey::erase() handling one more edge case when deleting a value at the end of a leaf.
Fixed erase( iterator ) to update separator keys.
@psiha psiha force-pushed the feature/containers_pt2_btree branch 4 times, most recently from 8f59ba5 to c1d396c Compare October 26, 2024 17:26
Using (faster) pdqsort from Boost.Move for bulk inserts.
Using automatic minimal-size deduction for node_size_type.
Optimized the core find() function.
Various fixes around the pass_in_reg machinery.
Made use_linear_search_for_sorted_array actually user specializable by converting it into a variable.
Switched to using a smaller node size (with a brief comment).
Fixed bulk_insert_prepare() for empty input.
Fixed bulk_insert_into_empty() handling of short input sequences.
Fixed node_count_required_for_values() logic.
Fixed handling of an edge case in the bulk insert helper merge() function.
Added basic benchmarking.
@psiha psiha force-pushed the feature/containers_pt2_btree branch from c1d396c to 9f5f994 Compare October 26, 2024 17:39
psiha added 2 commits October 26, 2024 23:28
Fixed an edge case handling in lower_bound_impl().
Fixed hinted insert to handle the edge case requiring separator key update.
Added more documentation links.
Minor debug build bug fixes.
@psiha psiha merged commit e80278e into master Oct 28, 2024
5 checks passed
@psiha psiha deleted the feature/containers_pt2_btree branch October 28, 2024 08:01
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

Successfully merging this pull request may close these issues.

1 participant