Can anyone compare Essaouira to Stonetown, Zanzibar?

Odd question, but everything I read about Essaouira reminds me of my experience in Stonetown, Zanzibar. Medieval city with winding streets and alleyways, overlooking the sea. Old trading town. Has anyone been to both that can compare and contrast the two for me? My time in Morocco is limited, so I wonder if time in Essaouira will just duplicate my experience in Stonetown.