Dev Tools · 9h ago
Dart semantic search gets 10x speedup with packed matrices and SIMD
A developer optimized on-device semantic search in Flutter by replacing hand-written cosine loops with packed Float64x2 matrices and SIMD dot products. For 20,000 documents with 384-dimension embeddings, the approach reduced top-5 query time from 50ms to under 5ms. Memory usage dropped from 60MB to 30MB by storing embeddings contiguously.
Meridian48 take
The post is a practical deep-dive into Dart performance tuning, but the technique is well-known in other ecosystems—Dart's SIMD support is finally catching up.
Read the full reporting
Semantic search in Dart without the hand-written cosine loop →
DEV Community
dartsemantic-search