Go to about:config (by writing about:config in the location bar) and right-click on any line and select New > Boolean. As name put config.trim_on_minimize. As value put False.
Firefox gives away most of the RAM it uses you minimize it. This will make it keep the RAM and thus speed up maximizing. Firefox will still give the RAM when Windows ask for it.