Understanding science of speed difference between two bikes I have two MTBs and one is slower than the other.

Bike1 has Deore derailleurs and a double chainring with 10 sprockets and Shimano hubs. Which has a great speed irrespective of the gear combination. 

Bike2 has Acera derailleurs with a triple chainring and 8 sprockets with acera and Quando hubs.

The second bike is much slower than the first one in terms of speed.

My question is, apart from physical strength, which is more important for speed, a hub or drivetrain?

I want to upgrade my bike. Can anyone guide me to get more-or-less the same speed. Both bikes are from same brand and almost identical in terms of dimensions and shape.

Please help me to understand the science.
There is a myriad of factors that can effect how 'fast' a bike is. By 'fast' I mean both maximum speed and acceleration. When riders talk about a bike being 'fast' they usually means it accelerates well. You don't state it explicitly but because you have Deore and Acera drivetrains I guess you have mountain bikes. Acceleration and climbing ability is much more important on an MTB than straight line speed.

Acceleration is force/mass. More force, less mass means more acceleration. The Acera bike although similar to the Deore bike probably has downgraded components, frame and wheels and weighs more. If you think about it an Deore  level bike from the same manufacturer should be designed to be faster than a Acera bike - that's why the Deore bike can cost more.

Anything that soaks up energy will reduce the amount of force applied to the pedals that makes it to the contact patch between the rear tire and the ground:


Drivetrain losses - friction in the chain, wheel bearings, bottom bracket bearings. Chain friction is dependent on wear, how clean and lubed it as and also the angle it has to run at.
Rolling resistance of the tires and wheels. This caused by the tire deforming and is heavily dependent on tire size, pressure and construction.
Suspension losses - if pedaling causes the suspension to bob up and down energy is lost. That's why forks and rear shocks have lockouts  
Anything else that flexes - frame, wheels, crank.