Commit graph

13 commits

Author SHA1 Message Date
Janis b11805aacd refactor(tree): simplify node structure and improve memory handling
- Replaced `InternalNode` with a unified `LeafNode` structure to simplify
  the node hierarchy and reduce redundancy.
- Introduced `capacity` field in `LeafNode` to dynamically manage keys
  and edges, replacing fixed-size arrays.
- Added methods for growing node capacity and handling dynamic memory
  allocation for keys and edges.
- Updated `NodeRef` methods to work with the new `LeafNode` structure,
  including safe handling of raw pointers and memory operations.
- Adjusted tests to reflect the new node structure and ensure correctness.
2025-08-15 23:01:04 +02:00
Janis e07e69a0c4 feat(tree): enhance tree structure with debug traits and new methods
- Add `Debug` implementations for tree-related structs and enums
- Introduce new methods for node manipulation, including `make_internal_node`
- Refactor `Tree::entry` to support key insertion and retrieval
- Improve internal node handling with enhanced parent-child link management
- Add test cases for tree operations and debug output
2025-08-08 20:57:02 +02:00
Janis b6c16f2739 feat(tree): enhance tree structure with new features and optimizations
- Added support for `maybe_uninit_slice` feature in `lib.rs`
- Introduced `Borrow` and `Ordering` imports in `tree.rs`
- Refactored marker structs and renamed `KV` to `Value`, `Immutable` to `Immut`
- Updated `LeafNode` to use `Option<MaybeUninit<V>>` for value storage
- Simplified `NodeRef` type parameters and added `Sync` and `Send` implementations
- Enhanced `Handle` with `new_value` method for value handling
- Added methods for parent link correction and child link management
- Implemented `search` module for tree traversal and key lookup
- Introduced `entry` module for managing vacant and occupied entries
- Added `DormantMutRef` utility for safe mutable reference reborrowing
2025-08-08 17:45:13 +02:00
Janis 7939d6df47 copy from std::tree 2025-08-08 01:08:06 +02:00
Janis 9e3fa2cdb0 u32,u64,u16 conversion functions, sync queue, random utilities
- `NextIf` iterator trait that yields the next element iff some predicate holds
- `u64_from_u32s`, `u32s_from_u64`, `u32_from_u16s`, `u16s_from_u32` functions
- moved `can_transmute` to `mem` module, added `is_same_size` and `is_aligned`
functions
- `copy_from` function for `TaggedAtomicPtr`
- attempt at a sync queue?
- `is_whitespace` function
2025-08-06 22:51:27 +02:00
Janis b3d4159883 Option type which short-cirtuits on Some instead of None in Try contexts 2025-07-06 15:05:04 +02:00
Janis 1ea8bcb3ed atomiccell 2025-07-03 16:50:41 +02:00
Janis f23f815708 simple atomic lock 2025-07-02 22:37:56 +02:00
Janis 71f1767092 nightly feature gate 2025-07-02 21:50:24 +02:00
Janis 56faa52d0d xorshift64star 2025-07-02 18:46:02 +02:00
Janis 119b49e20d random small things:
Send wrapper
available_parallelism
2025-07-02 18:07:25 +02:00
Janis 2fabc61378 smallbox 2025-07-02 18:04:21 +02:00
Janis 7eca9adde5 initial commit 2025-07-02 17:42:01 +02:00