by cherryteastain · 2y ago · 0 comments
Writing your own interner is under hundred lines of code and takes about 15 minutes. Writing a thread-safe interner is a bit trickier problem, but there are good libraries for that.
Whereas the separate small allocations will likely end up close together, which gives a better chance that a given cache line will contain several rather than just one.