Hacker GitHub

← All repos

maxim/wordmap

View on GitHub ↗ ★ 14 Ruby

Wordmap is a simple way to lookup data directly from disk, bypassing RAM. It uses pread (no buffering), and takes advantage of SSD's constant seek time. The data is stored in equal size "cells" making it easy to calculate where things are located based on vectors.

3 mentions on Hacker News by 1 person: 0 stories, 3 comments · first 2023-05-10 · latest 2025-01-11

Mentions per year 3 mentions · busiest year 2023 (2)
20082026
  1. …I also used lazy enumeration for traversing the wordmap in my no-RAM static storage gem. https://github.com/maxim/wordmap/
    comment by hakunin · 2025-01-11 · in A visual demo of Ruby's lazy enumerator
  2. …at runtime, SSD lookups were fast enough, and we didn't have to support a more elaborate db. [1]: https://github.com/maxim/wordmap
  3. …seeking sorted data in files with pread and binary search. Worked perfectly for our needs. [0]: https://github.com/maxim/wordmap