The ARM instruction set doesn't allow for special purpose IO instructions. So the minimum code for twiddling an IO bit is something like:
load R1, <address of IO port> ;1 16bit instruction, 1 32bit dataword
load r2, <bitmask> ; probably 32bit inst
store r2, specialreg(R1) ; write bitmask to special set/clear/toggle register
; (if one exists.) (or use bit-banding)
[size=78%]at about 96 bits, that's a lot compared to the single 16bit instruction an AVR could use (and it gets worse if you have a dumber IO port HW.)[/size]
[/size][size=78%]However, note that some of those values can STAY in registers once you've gone to the expense of loading them. (no help at all for digitalWrite(), but significant for something like bitbang_SPI_OUT()...)[/size]
[/size]