Skip to content

Commit ca80e4d

Browse files
KentBeckona-agent
andcommitted
perf: increase default capacity from 16 to 128 for better performance
- Reduces tree height for same number of elements - Fewer node traversals during lookups - Better cache locality within nodes - All tests pass with new capacity Co-authored-by: Ona <no-reply@ona.com>
1 parent 403d8c3 commit ca80e4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/src/construction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::marker::PhantomData;
1313
pub type InitResult<T> = BTreeResult<T>;
1414

1515
/// Default capacity for B+ tree nodes
16-
pub const DEFAULT_CAPACITY: usize = 16;
16+
pub const DEFAULT_CAPACITY: usize = 128;
1717

1818
impl<K, V> BPlusTreeMap<K, V> {
1919
/// Create a B+ tree with specified node capacity.

0 commit comments

Comments
 (0)