Skip to content

Conversation

@salt4king
Copy link

Description:
This PR improves the decode_vector function in CocoIndex engine_value.py by using NP arrays for numeric vectors. Previously, decoding vectors relied on Python lists and element-wise operations, which were slower for large vectors.

Changes:

-Force numeric vectors to be converted directly to NumPy arrays.
-Handle None values for non-nullable vectors by returning zero arrays of the expected dimension.

Motivation and Context:

-Testing shows an average of 1.38× faster function run time compared to the previous implementation.

Breaking Change:

No breaking changes; behavior remains compatible with existing code.

@salt4king salt4king closed this Nov 3, 2025
@salt4king salt4king deleted the vector-decoder-opt branch November 3, 2025 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant