A thought for pyramid normal exit:
Wouldn't the fastest way be to just carry the p-switch all-the way to the spikey bottom and then do a p-switch jump there to avoid damage? or maybe taking the key is faster i don't know, but still,
Be sure to make a save before entering the room as the position of the ball-'n-chains might be random which would prolly affect the speed alot.
EDIT: The previous post is completely retarded and should not be viewed by people who're impressionable.
I goofed around a bit on console and it seems to me the fastest way is to just dive down there with the cape. Dive as fast as you can, hug the left wall until you're in a good position, press x whenever you're in good positition continue to dive and pull up just before you hit the second "floor" of spikes. This will give you a few more frames of air-time before Mario hits the spiked cieling (don't think you can avoid that w/o losing time). He then becomes invincible, falls onto the floor which gives you enough time to jump with him to safety.
Crappy demo here:
Link
Alternatively, you can do something along the lines of diving into the spikes and then use the flying-speed-while-running-bug to gain a few frames. Sorry i have no smv on this, I just play around with a savestate on the console.
EDIT2: Fixed a crappy demo. Also, you prolly won't have to jump of the grey platform to gain flying, I don't know why i did that. If you do have to jump up to become flying then maybe key-jumping is faster after all. Oh, and pounding the p-block in the beginning of the room saves loads of time, so the p-block-jump idea was retarded (which has already been stated).