I have a dictionary that I am writing to a file and then loading it again. The dictionary has some sets, so I have the option of either doing an eval() or json.dumps() with a custom ModelEncoder.
I tried both and json has a much smaller memory footprint than eval does. Why does eval take up so much more memory?