From d72dd6f2938870f1bdc264002532ac46276765d2 Mon Sep 17 00:00:00 2001 From: Sanket Kedia Date: Thu, 5 Dec 2024 00:29:20 -0800 Subject: [PATCH] Add todo comment --- rust/index/src/spann/utils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/index/src/spann/utils.rs b/rust/index/src/spann/utils.rs index d00e89ddb35..5963ca7615d 100644 --- a/rust/index/src/spann/utils.rs +++ b/rust/index/src/spann/utils.rs @@ -342,6 +342,7 @@ fn init_centers( let mut lambda = 0.0; // Randomly choose centers. for _ in 0..num_iters { + // TODO(Sanket): Instead of copying full centers, we can use indices to avoid copying. let mut centers = vec![vec![0.0; input.embedding_dimension]; input.k]; for center in centers.iter_mut() { let random_center = rand::thread_rng().gen_range(input.first..batch_end);