#ord #prefix-tree #tree #prefix #binary-tree #order

no-std tree_ord

An ordering that skips prefixes in tree searches

1 unstable release

0.1.0 Aug 29, 2023

#306 in No standard library

MIT/Apache

25KB
410 lines

Tree Ordering

This is an experiment to determine if we can improve on Ord in the context of binary tree searches, where we can skip comparing the same prefixes in some cases. Note that it turns out that this is not faster than Ord in most cases, although very complex and long keys can be faster.

Provides the TreeOrd trait, similar to Ord but with the ability to optimize binary tree searches.

There are "alloc" and "std" features enabled by default that can be turned off.


lib.rs:

Note that there are "alloc" and "std" feature flags that can be turned off

No runtime deps