From 7d61e358b01307ddfa65529d992e1c423d28fd8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20H=C3=B6ffner?= Date: Mon, 23 Jan 2023 15:37:53 +0100 Subject: [PATCH] Sort by cached key when generating wavelet matrix. Release 0.0.12. --- Cargo.toml | 2 +- README.md | 4 ++-- src/triples.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 098d7b1..6bc7211 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdt" -version = "0.0.11" +version = "0.0.12" repository = "https://github.com/konradhoeffner/hdt" authors = ["Tim Baccaert ", "Konrad Höffner"] license = "MIT" diff --git a/README.md b/README.md index baec27c..286c523 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ If you need any of the those features, consider using a SPARQL endpoint instead. ```toml [dependencies] -hdt = "0.0.11" +hdt = "0.0.12" ``` ```rust @@ -61,5 +61,5 @@ If you don't want to pull in the Sophia dependency, you can exclude the adapter: ```toml [dependencies] -hdt = { version = "0.0.11", default-features = false } +hdt = { version = "0.0.12", default-features = false } ``` diff --git a/src/triples.rs b/src/triples.rs index b5154f8..84f26f9 100644 --- a/src/triples.rs +++ b/src/triples.rs @@ -245,7 +245,7 @@ impl TriplesBitmap { for mut indices in indicess { let mut first = true; // sort by predicate - indices.sort_unstable_by_key(|a| get_p(*a)); + indices.sort_by_cached_key(|a| get_p(*a)); for index in indices { bitmap_index_dict.push(first); first = false;