Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docs/release notes/4.1.0/681.performance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Performance Improvements: Vector Serialization

### Summary
Optimized vector serialization in `MemorySegmentVectorProvider` by replacing
per-element scalar writes with bulk operations, significantly reducing
serialization overhead.

### Key Changes
- **`writeFloatVector`**
- Uses backing `float[]` with `writeFloats()` instead of per-element
`writeFloat()`

- **`writeByteSequence`**
- Uses backing `byte[]` with bulk `write()` instead of per-element
`writeByte()`

### Impact
- Removes a major scalar-write bottleneck in the native SIMD backend
- Improves index construction performance on large Intel hosts (e.g., AWS
`x8i.24xlarge`)

### Index Build Improvements
- **openai-1536-1m:** ~57% faster (105.59s → 45.22s)
- **openai-3072-1m:** ~38% faster (164.63s → 102.75s)

### Microbenchmark Summary
- Bulk serialization improves throughput by **~1.3× to 1.9×** across tested
vector sizes
Loading