Ross
Have a look at the specific Reference Manual for the CPU you're going to use.
If, for example, I refer to the MCF51CN128 Reference Manual
http://cache.freescale.com/files/32bit/doc/ref_manual/MCF51CN128RM.pdf?fpsp=1
then, in section 7.3.4 is a whole discussion of Instruction Execution Timing.
It's pretty involved, depending on the addressing mode you're using for each instruction operand. Definitely a non-trivial task if you're trying to figure out the timing for any significant section of code. The older 68HC05 assembler (going back 10 years !) used to give a nice listing showing execution times for each line of machine code, but I've never discovered the same thing with CodeWarrior. Sigh ! The definition of "progress' is always a relative term !
Sometimes it's easiest to use some spare I/O ports to drive a few oscilloscope channels and look at the execution times for your code that way.
With regard to switching ports from inputs to outputs, I would expect that it's only limited by the time to change the value stored in data direction register associated with the port. This should simply be a function of clock speed and execution time for whatever instruction your compiler generates to do this. I can't recall seeing anything in the Reference Manual which says this is limited by some other factor. 10 times per second should be a walk in the park. Remember, if you were using an external data bus e.g. the Mini-FlexBus, it would be switching the bus data lines must faster than you are !
Good luck, and let us know how you're doing !
J