Side note for premature optimization hater sanitys sake: Either way it doesn't really save enough memory compared to just preloading and moving everything (which nim will probably do bc of GC) for the time to change it to be worth it, so unless you plan to work with tens of millions of lines it's probably not something to worry too much about until it's an issue. (I would do, and have done, random "pointless" optimizations like that too in personal projects that have no time constraint even knowing that they won't do much, so don't listen to this if you're like me and don't mind the time lol)