RAM is not what will have the more impact on the processing time. At the end of the day, the same number of pixels is processed and written on the disk, which is where most of the time is spent.
Increasing the RAM will reduce the number of required streaming blocks (down to one block in your example, where everything is loaded in the RAM). It might results in some performance gains (less calls to rasterIO, less C++ objects to create), but probably small in comparison with the pixel processing time.
What will have the most impact on processing time is probably the CPU, and possibly the hard drive (IO time)