Arduino nano, but faster

PaulRB:
I then went back to the Nano to see if the pointer version worked OK:

#define PIN 2

uint8_t *myPort;
uint8_t myPinBit;

...

*myPort |= myPinBit;
    *myPort &= ~myPinBit;




It did work, and the result was:
digitalWrite() 3.59us, Port Manipulation 0.41us which is 8.76 times faster

So using the pointer slowed down the direct port manipulation, but it works with and without using a pointer.

Using the "volatile" keyword slowed it down a little further:
digitalWrite() 3.59us, Port Manipulation 0.54us which is 6.70 times faster

Thanks, this seems to be the way to go for now and now comes the big BUT, would it be possible to write example with more ports used than only one. There are probably many hobbyist like me, monkey see, monkey do. With this example I can directly use one port, but how to define if used more than 1? Like every time, did some google on this and google choose to not give me answer on this, just keep saying "these are not the direct access codes you are looking for".