mirror of
https://github.com/andreytkachenko/kdtree-rust.git
synced 2024-11-25 02:46:22 +04:00
Added inline to dims(), impacts performance greatly.
This commit is contained in:
parent
89428ed260
commit
b85932fe64
@ -62,5 +62,5 @@ fn bench_adding_same_node_to_1000_tree(b: &mut Bencher) {
|
||||
|
||||
|
||||
|
||||
benchmark_group!(benches, /* bench_creating_1000_node_tree, */ bench_single_loop_times_for_1000_node_tree /*,bench_adding_same_node_to_1000_tree */);
|
||||
benchmark_group!(benches, bench_creating_1000_node_tree, bench_single_loop_times_for_1000_node_tree,bench_adding_same_node_to_1000_tree);
|
||||
benchmark_main!(benches);
|
@ -16,6 +16,7 @@ impl Point3WithId {
|
||||
}
|
||||
|
||||
impl KdtreePointTrait for Point3WithId {
|
||||
#[inline]
|
||||
fn dims(&self) -> &[f64] {
|
||||
return &self.dims;
|
||||
}
|
||||
@ -37,6 +38,7 @@ impl Point2WithId {
|
||||
}
|
||||
|
||||
impl KdtreePointTrait for Point2WithId {
|
||||
#[inline]
|
||||
fn dims(&self) -> &[f64] {
|
||||
return &self.dims;
|
||||
}
|
||||
@ -58,6 +60,7 @@ impl Point1WithId {
|
||||
}
|
||||
|
||||
impl KdtreePointTrait for Point1WithId {
|
||||
#[inline]
|
||||
fn dims(&self) -> &[f64] {
|
||||
return &self.dims;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user