I am curious to know, if I activate all the pins of the Arduino (i.e. pinMode(7,OUTPUT);), does it reduce the processing speed? Or will it use too much resources? So, what was the purpose that we activate the pins each time that we are writing the codes.
Well, this is just my curiosity. I don't have any problem doing it but it is really interesting to know the background of what we do!
Pins default to INPUT at power-up. Usually you want to use OUTPUT or INPUT_PULLUP so you must explicitly set the pin mode. It's good practise to do this even for things which are INPUT as it is a clue to future debugging that that pin is in use.
This has no effect on the processor speed. It doesn't cost it anything to input our output more pins. That's all done in the hardware, using zero processor cycles.
For ultra-low power applications, the pin modes can affect the power consumption. There are weird cases where an OUTPUT pin uses less power than an INPUT. See Nick Gammon's excellent blog for more details.