Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

I feel like there's gotta be a suitable data structure that does 'member that looks like 'member and not 'gethash as well. I'll ask people on my show, they're smart ;p

(+1)

I didn't see anything built-in, although it looks like there is at least one library: https://github.com/samebchase/hash-set/

I guess the idiom is most of the time to just use 'member. 'member will be O(b . n) for very small b, whereas using a hashtable with no collisions will be O(c . 1) for very large c. And maybe there are collisions, so <hash table collision complexity>