# Just Brute Force Your Embeddings Instead of Using a Vector Database

> Hacker News story 49119065 · language: en · submitted 2026-07-31
> Web version: https://zeli.app/story/49119065
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 33 · by [JohnBerryman](<https://news.ycombinator.com/user?id=JohnBerryman>) · 💬 13
[original](<https://softwaredoug.com/blog/2026/07/29/just-brute-force-embeddings>) · [HN discussion](<https://news.ycombinator.com/item?id=49119065>)

## Summary

I often see teams overcomplicating search by adopting heavy vector databases for small datasets. For around one million documents with low traffic, a simple Numpy brute-force approach on an M4 MacBook Pro delivers impressive speed without the operational overhead. You can achieve fast retrieval using basic dot products in Python until your scale truly demands a specialized database.

## Key quote

> My O(n) algorithm can run circles around your O(log n) algorithm; why much of what you learned in school simply doesn't matter.

## HN discussion (13 comments)

### [emschwartz](<https://news.ycombinator.com/item?id=49103938>)

> This works especially well if your embedding model was trained to perform well with quantized embeddings. Binary + hamming distance = incredibly fast.
>
> This post is from 2024 but I wrote about using this technique  in https://emschwartz.me/binary-vector-embeddings-are-so-cool/

### [Ellis_dev](<https://news.ycombinator.com/item?id=49119135>)

> The 1M-document numbers are a great reality check. I’d happily start with the NumPy version and only reach for a vector DB once it actually hurts.

### [firasd](<https://news.ycombinator.com/item?id=49128781>)

> Yes! I'm working on an MCP server called Liveclip (not released yet) and we just store embeddings as text in SQLite.. it works over ~40MB of text, 1450 SCOTUS opinions
>
> start=$(date +%s); curl -s -X POST "https://[urlredacted].workers.dev/mcp" -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"table_search_similar","arguments":{"key":"scotus_2010s","col":"M","query":"endangered fish"}}}'
>
> 2>&1 | grep '^data:' | sed 's/^data: //' | jq; end=$(date +%s); echo "elapsed: $((end-start))s"
>
> {
>
> "result": {
>
> "content": [],
>
> "structuredContent": {
>
> "has_more": true,
>
> "headers": {
>
> "A": "author_name",
>
> "B": "category",
>
> "C": "per_curiam",
>
> "D": "case_name",
>
> "E": "date_filed",
>
> "F": "federal_cite_one",
>
> "G": "absolute_url",
>
> "H": "year_filed",
>
> "I": "scdb_id",
>
> "J": "scdb_decision_direction",
>
> "K": "scdb_votes_majority",
>
> "L": "scdb_votes_minority",
>
> "M": "text"
>
> },
>
> "offset": 0,
>
> "ok": true,
>
> "rows": [
>
> {
>
> "A": "Justice Thomas",
>
> "B": "dissenting",
>
> "C": "False",
>
> "D": "Florida v. Georgia",
>
> "E": "2018-06-27",
>
> "F": "",
>
> "G": "https://www.courtlistener.com/opinion/4511641/florida-v-geor...",
>
> "H": "2018",
>
> "I": "",
>
> "J": "",
>
> "K": "",
>
> "L": "", […]

---

## Cite

- Page: https://zeli.app/story/49119065
- Date: 2026-07-31
- Source: softwaredoug.com (https://softwaredoug.com/blog/2026/07/29/just-brute-force-embeddings)
- Hacker News: https://news.ycombinator.com/item?id=49119065

## Other languages

- zh: https://zeli.app/zh/story/49119065 · markdown: https://zeli.app/zh/story/49119065.md
