Why is a road bike faster than a city bike with the same effort? How much faster it can be? Why is a road bike faster than a city bike with the same effort? And how much faster it is? (if someone have measured it)

Motive of the question:

My current bike is a city bike with front fork shock absorber and seatpost shock absorber under the saddle.

It is very heavy &amp; I feel maintaining 20 km/hr for 30 minutes is very hard on flat city roads.  I am thinking of switching to a road bike but I want to understand if it is really worth it as my bike is very sturdy, with hub dynamo, fenders &amp; rear rack (all of these are not on the entry level road bikes.)

I know this sound a bit controversial but I hope someone will help me from our community.
Having made the change myself, I can confirm that shock absorbers are actually detrimental to city riding. You lose a lot of power, especially when trying to stand on the pedals for acceleration.

Road bikes are also typically much lighter, which in my experience not only helps you go uphill faster, but also makes it a lot easier to carry the bike when necessary.  For instance when I am leaving my place, with my old bike I would've had to clumsily roll it out, but with the road bike I can just carry it out to the street.  It's not something you typically think about, but it saves time. 

As a final note, while you can't turn a mountain bike into a road bike, you can make some changes that would improve it's road performance a bit. One thing you can do is swap out your normal nubby tires for slicks. Slick tires, pumped to the appropriate pressure, will reduce your rolling resistance. Also if your shocks are the adjustable kind, then increase the firmness, or even lock them entirely, so that they won't waste as much of your energy.