-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
There are multiple .clone() calls that could be optimized:
// Lines 333-342 (during deserialization)
hnsw.insert(values.clone(), searcher)
// Lines 374-383 (during add operation)
hnsw.insert(vector.values.clone(), searcher)
// Lines 508-510 (during get_vector)
values: values.clone(),
text: meta.text.clone(),
metadata: meta.metadata.clone(),Considerations:
- Use
Arc<Vec<f64>>for shared vector values - Use
Arc<String>for text - Consider
Arc<serde_json::Value>for metadata - Can HNSW library accepts references instead of owned values?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels