I'm trying to figure out how to decrease the memory usage in a php script. Problem is that I need to use ini_set('memory_limit','1024M'); because I load 2 big arrays (2Million entries each) and I was wondering if I could swap memory in any way.
Process time is quite good but it takes like 610706920 when I use memory_get_usage.
Also I've been trying to reduce the memory usage by unsetting unused variables and arrays but it still spikes too high.