Hacker News new | past | comments | ask | show | jobs | submit login

Or you could go the Clojure route and do the tree-style immutable vectors where the cost is log32(N) for most operations, small enough in all the relevant operations, and you get the amazing usability of immutable data structures that are performant enough in most cases.



How does that scale down to small sequences of under ten items?


an array is used for the last 1-32 elements of the vector (the "tail") so there would be no trie at all, just the tail




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: