Tobechukwu Ikenwe

C++ · ONNX Runtime · OpenMP · AVX2/FMA

HyperSearch

High-Performance Vector Search Engine

View Source Code

What I Built

HyperSearch is a C++ semantic search engine built from first principles. It converts text into 384-dimensional embeddings and performs similarity-based retrieval across collections of up to 100,000 vectors.

Rather than treating vector search as a black box, I built and optimized the core retrieval pipeline myself, using the project to investigate how algorithms, memory layout, multithreading, and CPU-level vectorization affect real-world search performance.

How It Works

Text
↓
384-dimensional embedding
↓
Vector storage
↓
Similarity computation
↓
Top-K retrieval

The initial implementation used brute-force similarity search. Every query was compared against the stored vectors, providing a simple and measurable baseline before optimization.

Performance Engineering

I established a reproducible benchmark across collections ranging from 1,000 to 100,000 vectors. The initial brute-force implementation reached approximately 1.10 seconds of median latency at 100K vectors and 4.19 queries per second.

I then optimized the retrieval pipeline through multiple layers: OpenMP multithreading to distribute search work, AVX2/FMA SIMD instructions to accelerate numerical computation, and memory-layout improvements to make vector access more efficient.

Results

138×

Latency improvement at 100K vectors

125.75

QPS after optimization

100K

Vectors tested in the benchmark

Engineering Lessons

The project taught me that performance optimization starts with measurement rather than assumptions. I established a baseline, identified the expensive parts of the retrieval pipeline, applied one class of optimization at a time, and measured the result.

HyperSearch ultimately became less about building a search feature and more about understanding the interaction between algorithms, memory, parallelism, and CPU architecture.

Want the full engineering story?

Read the detailed breakdown of the design decisions, optimization process, benchmarks, and lessons learned.

Full Story of the Project