I’ve had to explain too many times to people who should know better that “rss” is not how much memory a process needs but how much the operating system allows it to have. Put other stuff on the machine and that number will go down. No it’s not that improvement you think you made to that data structure. If you want that, look at total memory or heap size after GC if it’s a garbage collected language.