frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Ask HN: Feedback on "QSS" – A Quantized Vector Search Engine in C

2•wmolino•2h ago
Hi HN,

I've been working on a vector search engine called QSS (Quantized Similarity Search). It's written in C and explores the idea of aggressively quantizing embedding vectors to 1-bit per dimension. It uses XOR + popcount for fast approximate search, followed by re-ranking using cosine similarity on the original vectors.

The main goal is to see how far you can push quantization without sacrificing too much search quality—while gaining significantly in memory usage and speed.

How it works Embeddings are quantized to 1 bit per dimension (e.g. 300D → 300 bits → ~40 bytes).

Search is done using bitwise XOR and popcount (Hamming distance).

A shortlist is re-ranked using cosine similarity on the original (float) embeddings.

Supports GloVe, Word2Vec, and fastText formats.

Goals Analyze the trade-offs between quantization and search accuracy.

Measure potential speed and memory gains.

Explore how this approach scales with larger datasets.

Preliminary tests I’ve only run a few small-scale tests so far, but the early signs are encouraging:

For some queries (e.g. "hello", "italy"), the top 30 results matched the full-precision cosine search.

On Word2Vec embeddings, the quantized pipeline was up to 18× faster than the standard cosine similarity loop.

These results are anecdotal for now—I’m sharing the project early to get feedback before going deeper into benchmarks.

Other notes Word lookup is linear and unoptimized for now—focus is on the similarity search logic.

Testing has been done single-threaded on a 2018 iMac (3.6 GHz Intel i3).

If you're interested in vector search, quantization, or just low-level performance tricks, I'd love your thoughts:

Do you think this kind of aggressive quantization could work at scale?

Are there other fast approximate search techniques you'd recommend exploring?

Repo is here: https://github.com/buddyspencer/QSS

Thanks for reading!

One Architect's Quest to Save Mumbai's Heritage from Disappearing

https://www.bloomberg.com/news/features/2025-06-18/architect-abha-narain-lambah-on-conserving-gateway-of-india-mumbai-heritage
1•MarlonPro•36s ago•0 comments

Laid off from Microsoft after 23 years, and I'm still going into the office

https://www.businessinsider.com/show-up-microsoft-office-layoffs-23-year-career-2025-6
2•mooreds•1m ago•0 comments

Browser Security, Privacy, and Performance Trade-Offs in 2025

https://guptadeepak.com/browser-security-landscape-transformed-in-2025/
1•guptadeepak•1m ago•0 comments

Scientists use bacteria to turn plastic waste into paracetamol

https://www.theguardian.com/science/2025/jun/23/scientists-use-e-coli-bacteria-to-turn-plastic-waste-into-paracetamol-painkiller
2•bdev12345•2m ago•0 comments

I Switched from Flutter and Rust to Rust and Egui

https://jdiaz97.github.io/greenblog/posts/flutter_to_egui/
2•jdiaz97•5m ago•0 comments

Review of Film Cooling Techniques for Aerospace Vehicles

https://www.mdpi.com/1996-1073/18/12/3058
1•PaulHoule•6m ago•0 comments

Python for Excel Users

https://nostarch.com/python-excel
1•teleforce•6m ago•0 comments

Putin knows we are spreadsheet warriors

https://unherd.com/2025/06/europe-cant-afford-its-defence-commitments/?us
3•jnord•7m ago•0 comments

Ask HN: How can I pivot from software engineering back into neuroscience?

3•terrib1e•8m ago•0 comments

How good are you at distinguishing AI images?

https://aiorhumans.com
1•Michaelgathara•12m ago•0 comments

Handbook of Applied Cryptography

https://cacr.uwaterloo.ca/hac/
1•mooreds•16m ago•1 comments

Interview Like a Consultant (2010)

https://recruitinginferno.com/2010/12/07/interview-like-a-consultant/
1•mooreds•23m ago•0 comments

Pixar's Newest Movie, 'Elio', Is a Box-Office Dud

https://www.nytimes.com/2025/06/22/business/elio-pixar-box-office.html
1•Bogdanp•24m ago•0 comments

IWP9 Talk Recordings

https://www.youtube.com/playlist?list=PLEZEb6vVXSE-CV_vti2I6tJQNBn6f9swB
2•todsacerdoti•27m ago•0 comments

How many PhDs does world need? Doctoral graduates outnumber academia jobs

https://www.nature.com/articles/d41586-025-01855-w
5•TMWNN•28m ago•3 comments

Assessing the Potential for Regime Change in Iran

https://worldview.stratfor.com/article/assessing-potential-regime-change-iran
1•kamaraju•33m ago•0 comments

PandasBench – The First Benchmark for the Pandas API

https://adapt.cs.illinois.edu/projects/PandasBench.html
3•gliontos•35m ago•0 comments

Ask HN: Please recommend an app for learning new languages

2•VladVladikoff•40m ago•1 comments

Interactive Book on Computer Science Algorithms

https://old.reddit.com/r/SideProject/comments/1liga56/i_wrote_a_680page_interactive_book_on_computer/
4•fcq•40m ago•0 comments

How I configure VS Code for agentic coding

https://beyang.org/how-i-configure-vs-code-for-agentic-coding.html
3•ghuntley•41m ago•0 comments

Dream Recorder is a portal to your subconscious

https://modemworks.com/projects/dreamrecorder/
1•strohwueste•43m ago•0 comments

How A Small Class at Caltech Helped Launch a Computer Revolution

https://www.caltech.edu/about/news/how-a-small-class-at-caltech-helped-launch-a-computer-revolution
1•ggandhi•43m ago•1 comments

Recent CS grad unemployment twice that of Art History grads

https://old.reddit.com/r/singularity/comments/1likrhu/recent_cs_grad_unemployment_twice_that_of_art/
3•miles•43m ago•0 comments

Matter vs. Force: Why There Are Two Types of Particles

https://www.quantamagazine.org/matter-vs-force-why-there-are-exactly-two-types-of-particles-20250623/
2•jnord•44m ago•0 comments

Florida Builds 'Alligator Alcatraz' Detention Center for Migrants in Everglades

https://www.nytimes.com/2025/06/23/us/politics/florida-alligator-alcatraz-migrant-detention-center.html
3•cempaka•46m ago•1 comments

Couchbase Acquired for $1.5B

https://www.reuters.com/legal/transactional/haveli-investments-buy-ai-database-firm-couchbase-about-15-billion-2025-06-20/
2•nvais•47m ago•1 comments

Trump announces Israel-Iran ceasefire

https://www.politico.com/news/2025/06/23/israel-iran-ceasefire-trump-00419364
6•Eugeleo•52m ago•1 comments

Show HN: My$10/30-day challenge: I built a SaaS starter kit

https://www.launchkitaws.com/
1•UpbeatFix•56m ago•0 comments

Simon Willison on Phoenix.new

https://simonwillison.net/2025/Jun/23/phoenix-new/
2•davidarenas•59m ago•1 comments

Bazel's Original Sins

https://fzakaria.com/2025/06/22/bazel-s-original-sins
1•setheron•1h ago•0 comments