Careful, this is strongly dependent upon the hardware, not Linux.
I seem to recall that people doing SWD programming can barely get the GPIO's to move faster than a couple of KHz.
I can tell you that, at least on the BeagleBone Black, you have to do some Linux driver voodoo to get better than a couple of KHz.
Edit: I stand corrected. Apparently the Broadcom chip in the RPi does much better than the TI one in the BeagleBone Black when driving baseline GPIO's.