@ericihli if you're free to choose the memory layout, could I suggest you use not one but two continuous regions of memory? One region is just all your fixed-size structs (no variable-length ints) without the actual string data which you can easily binary search. Instead of storing the string data inside your struct, you store an array index where the string starts in your second region (which consists of all concatenated variable-length strings). With some extra effort, you could even do variable-length ints in the first region (if it's a major space saving), since you can more easily identify where the structs begin and end without the string data — for example, you could separate them with a single zero byte while ensuring no other bytes would be zero. Actually, while thinking about it, I think even your original data structure does not have zero bytes in it, so you could use a zero byte as a record separator for a random binary search indexing.
1💯1❤️Yup. Try saying something nice about Clojure on /r/lisp and you will either be told that Clojure is not a Lisp or that Common Lisp can do everything Clojure does and more.
Heh I did just learn from the Hacker News comments about a whole load of stuff that Common Lisp does that Clojure doesn't (mainly around interactive programming). Maybe one day, I'll find the energy to learn Common Lisp just so I can experience those things :-)
did anyone know that there was a phd dissertation written about Clojure? "TRANSLATING CLOJURE TO ACL2 FOR VERIFICATION" by RYAN LEE RALSTON to the University of Oklahoma?
I skimmed it a few years ago
kinda sounds up your alley
you do lots of verification in ocaml right?
indeed, and our logic is modelled kinda closely to that of ACL2's (PRA + TI(epsilon_0))
though it's, of course, typed