As fast as possible? Turn off motion blur and depth of field for one. Use less effects? Render smaller dimensions?
Not sure what you are asking...
For hardware specs: more = faster. It's pretty simple: faster CPUs render faster.
More RAM allows AE to store more frames/layers internally.
Is there one optimal combination of CPU and RAM for all AE projects? Not really. Is it big and shallow (few layers, but 4K resolution? or narrow and deep (SD resolutions, but thousands of layers)?
There will be some video clips and some graphic on top. Not many layers present at the same time.
When I tried different Amazon server's I tried with a pretty standard server with moderate setup. I then tried high CPU/moderate RAM, high RAM/moderate CPU and high RAM/high CPU. The outcome was that neither of the servers did render much faster than the moderate server, it was some seconds in difference only.
So I wondered if there was a preferred setup say I should use multiple servers with moderate specs instead of one monster server with huge specs.