Windows keeps unused code in ram in anticipation of quick reuse.
For that reason, the more ram you have the better.
If one truly knows the code they use and the pattern of usage, it is possible to optimize.
But, generally, it is better to let windows detect your sage and manage things.