Get the latest tech news
Small Strings in Rust: smolstr vs. smartstring (2020)
Hey everyone! This article is brought to you by a shameless nerd snipe , courtesy of Pascal. In case you've blocked Twitter for your own good, this reads: There should be ...
We can also see that between those peaks, memory usage increases steadily - each String stores its data on the heap, which explains the number of allocation events, 2017. And our initial streaming solution may well work - because we're only reading out the city and state fields - not all the others, which I'm sure make up the bulk of the 100 GiB input file. As for smartstring, it's recommended for "a key type for a B-tree" (such as BTreeMap), because inline strings greatly improve cache locality.
Or read this on Hacker News