---
date: 2025-03-06T12:48:02+00:00
modified: 2025-03-06T12:48:02+00:00
permalink: https://kaspars.net/note/mastodon-social-114116033435765262
post_type: note
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
---

# On March 6, 2025 at 14:48

Experimenting with storing embedding vectors as packed 32-bit floats in a MySQL VARBINARY column and handling distance calculations in PHP.

As expected, the real bottleneck is the math — especially with larger vectors. Also array\_map() and array\_sum() are super slow and unusable for this.