For many years bicycles nearly universally had horizontal top tubes, but that has changed: now most bicycles have "compact" geometry, with top tubes that slope downwards from front to back. The question "What is the difference between a horizontal top tube and a sloped one?" generated a great discussion of the pros and cons of "compact" frames versus frames with horizontal top tubes. I have shamelessly stolen the pictures from that question.
Here's a bike with a horizontal top tube:
And here's a bike with a "compact" frame with a sloping top tube:
Answers to the other question pointed out that manufacturers don't need as many sizes with compact frames compared to frames with horizontal top tubes. I know that fewer models of a frame is an enormous advantage for manufacturers, distributors, and retailers, because fewer SKUs require less frames to be stocked, which brings costs down and better satisfies customers. That alone is surely strong motivation for manufacturers to adopt the compact geometry.
But I'm very curious to know if bikes with compact frames are actually lighter. Answers to the other question disagree on this point, which is why I'm asking a new question. Definitive proof would be nice, although that is surely hard to find. If compact frames were actually heavier or less stiff, other things being equal, then I assume that manufacturers would be motivated to tell white lies that bikes with compact frames are lighter and stiffer; manufacturers would surely prefer that people think design changes were intended to benefit riders, rather than being purely for business reasons.
So are bikes with sloping top tubes lighter than bikes with horizontal top tubes?
My goal in asking this question has been to determine why manufacturers really changed to compact geometry from the older geometry with horizontal top tubes. At least one manufacturer claims that the smaller frame triangles make the frame lighter and stiffer, and makes it easier to fit riders of all sizes. I think the answer to this question is correct, and that compact frame bikes are not actually substantially lighter than bikes with horizontal top tubes. I doubt that they're stiffer either, because the frame may be slightly stiffer, but the much longer and therefore bendier seatpost will probably negate that advantage.
Comments to the answer also point out that if the rider wants higher handlebars with a modern threadless stem, then the top tube has to slope for stand-over clearance. That seems to me to be a mere style issue that could be solved without sloping the top tube, by making the front tube or the steerer a bit longer. I believe the first picture in the question proves that point: the bicycle has high handlebars, a modern threadless stem, and a horizontal top tube.
That leaves what I believe is the real reason that manufacturers have switched to compact geometry: they don't need to stock nearly as many sizes. This is an enormous business advantage, because manufacturers, distributors, and retailers don't need to stock as many SKUs. Hopefully some of the cost savings result in lower prices for consumers.
To sum up, I don't think a bike with compact geometry is a substantially better bike than one with a horizontal top tube, other things being equal, but the bike with compact geometry was slightly cheaper to warehouse and distribute.