this post was submitted on 22 Jun 2024
797 points (98.7% liked)

Programmer Humor

31224 readers
65 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 week ago

At a certain level all data is a pair (some name, blob of bytes). You can concatenate sequences of those pairs into a tar archive and call that a database. To access "the last object" you'd have to seek over the "first" objects. So you can build another set of (some name, blob of bytes) that serves as an index into the first set. You'll first have to do at least one full pass over that first set, and you'll need to make space on the books to account for twice as many sets, AND you'll still have to do some seeking over the "first objects" in the indexing collection, but it all keeps recall times very short!