If you want fast, use direct port manipulation.
Turns out that to toggle a bit, you can just write a 1 to it:
D13 is PortB, bit 5:
PINB = PINB | 0b00100000;
From 14.1 of the datasheet:
Three I/O memory address locations are allocated for each port, one each for the Data Register – PORTx, Data
Direction Register – DDRx, and the Port Input Pins – PINx. The Port Input Pins I/O location is read only, while the
Data Register and the Data Direction Register are read/write. However, writing a logic one to a bit in the PINx Register, will result in a toggle in the corresponding bit in the Data Register. In addition, the Pull-up Disable – PUD bit
in MCUCR disables the pull-up function for all pins in all ports when set.
I am not sure of that question, but if you want to test it, you can.
Several ways, but one way is to :
Get the value of micros() when reset startMicros.
Do your test code in a for() loop for say,, 1000 loops.
find the difference between the current micros() and the startMicros.