Couldn't the Boeing 747's aerodynamics be improved by extending the hump further back, or sloping it back more gently? Wouldn't this make it more aerodynamic and therefore fuel efficient and faster?
The 747-300/400 has a longer hump than the original 100/200. Surprisingly, this longer hump had lower aerodynamic drag than the 200 hump: at higher mach numbers compressibility starts to cause serious drag increase. The speed at which this "drag divergence" occurs depends on the variance of cross section area of the plane. If the cross section of the plane would be a constant value, drag divergence speed would be closest to mach 1.
The longer bump on the 747-300 resulted in a more constant cross section and therefore higher drag divergence number => higher cruise speed.
Could it be made more efficient aerodynamically? Yes, by trying to match the Area Rule as closely as possible.
Bill Sweetman had a good article on this subject in Air and Space called How The 747 Got Its Hump. The basis for this was in the development of a large cargo aircraft Boeing designed to compete with Lockheed for the contract which resulted in the Lockheed C-5 airplane. Boeing lost the contract but saw potential in its design as a commercial cargo aircraft and airliner.
The aircraft could be loaded through a nose which would hinge upward, but the hinge point and attachment structure would have to be placed in the spot where the cockpit would have normally gone; the only option was to mount the cockpit high up on the fuselage. Original designs called for the cockpit to be in a blister type fairing above the nose, but wind tunnel testing revealed the design to be unacceptable and the fwd fuselage was redesigned with an elongated Hump to accommodate the cockpit.
Anyways when the passenger variants of the plane were pitched to the airlines, the Pan-Am bosses became enamored with the idea of using the space in the hump for a passenger lounge, some say out of nostalgia for the lower deck lounges which were installed in the old Boeing 337 StratoCruisers. As the 747 gained worldwide acceptance, the hump became a signature look for the jet (as I understand it Boeing has a patent on the design for that reason).
It is possible that if the 747 would have had its roots as a pure double deck airliner, the design would have looked more like the A380 does today.