this post was submitted on 21 Mar 2026
832 points (98.3% liked)

Programmer Humor

30516 readers
1636 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] sloppy_diffuser@sh.itjust.works 24 points 22 hours ago

Items are in a hash table using color/material type/shape as the hashing method optimized for human pattern recognition providing O(1) access. The table is smaller than the number of items causing some collisions. Those items are in a randomly sorted vector. Average case is still around O(1) with an O(n) worst case.