Unless the shooter had headphones/earplugs, he couldnt have heard crap after the first few shots. He would have been easy to sneak up on in the hallways.
I think I would have rather had the pistol in the situation that the cop found himself. Rate of Fire about the same. Pistol less accurate at long hallway distance but quicker to put on target. Easier to walk around with weapon at the ready. Maybe faster to reload.
I think the officer probably would have had a slight advantage, not including his (hopefully) more accurate shooting.
Never bring a pistol to a firefight. A pistol is for making it to your battle rifle.
I’d stick with a rifle.