He is using Python which is known to consume horrendous amount of memory(people porting to C++/Rust usually get x20-x50 memory consumption reductions)...