1- use core:: { any:: type_name, hash:: BuildHasherDefault , hint:: black_box, iter:: repeat_with, mem, time:: Duration } ;
1+ use core:: {
2+ any:: type_name, hash:: BuildHasherDefault , hash:: Hash , hint:: black_box, iter:: repeat_with, mem, time:: Duration ,
3+ } ;
24use criterion:: {
35 criterion_group, criterion_main,
46 measurement:: { Measurement as _, WallTime } ,
@@ -14,13 +16,9 @@ use rand::{
1416use spacetimedb_lib:: AlgebraicValue ;
1517use spacetimedb_sats:: { layout:: Size , product, u256} ;
1618use spacetimedb_table:: indexes:: { PageIndex , PageOffset , RowPointer , SquashedOffset } ;
17- use spacetimedb_table:: table_index:: uniquemap:: UniqueMap ;
18- use spacetimedb_table:: table_index:: Index as _;
19- use spacetimedb_table:: table_index:: {
20- unique_direct_index:: { ToFromUsize , UniqueDirectIndex } ,
21- KeySize ,
22- } ;
23- use std:: hash:: Hash ;
19+ use spacetimedb_table:: table_index:: unique_btree_index:: UniqueBTreeIndex ;
20+ use spacetimedb_table:: table_index:: unique_direct_index:: { ToFromUsize , UniqueDirectIndex } ;
21+ use spacetimedb_table:: table_index:: { Index as _, KeySize } ;
2422
2523fn time < R > ( body : impl FnOnce ( ) -> R ) -> Duration {
2624 let start = WallTime . start ( ) ;
@@ -201,7 +199,7 @@ trait Index: Clone {
201199}
202200
203201#[ derive( Clone ) ]
204- struct IBTree < K : KeySize < MemoStorage : Clone + Default > > ( UniqueMap < K > ) ;
202+ struct IBTree < K : KeySize < MemoStorage : Clone + Default > > ( UniqueBTreeIndex < K > ) ;
205203impl < K : KeySize < MemoStorage : Clone + Default > + Clone + Eq + Hash + Ord > Index for IBTree < K > {
206204 type K = K ;
207205 fn new ( ) -> Self {
0 commit comments