

Arduino pin I/O performance analysis - profquail
http://news.jeelabs.org/2010/01/06/pin-io-performance/

======
jws
The Arduino functions have a capability not available in the single opcode
instructions, namely the pin number can be a variable.

Sometimes you need this, mostly you don't. I recently saw some patches and
talk running around on the Arduino developer mailing list where clever use of
gcc's const checking directive was used to optimize the constant case to a
single opcode, but I don't know if that was clean enough to make it in to a
release.

Another case when you want to access the port directly is when you need to
change the state of several pins simultaneously.

And finally: Here is an old post of mine that is nearly ungoogleable about how
to get accurate timing of short events on an Arduino:
<http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1175115259>

