Certainly a 'Firefly' and a late version of the Panzer IV would have definately been a very tight duel!

It would have been up to the crew's capabilities and training (which were superior on the German side)...
Certainly, I've read about some veterans who state that the Panzer IV was the best tank to face Shermans, since it could move almost as easily as them, or at least had better speed and manœuvrability than 'Panthers' or 'Tigers'.