I think it is just not possible to say one aircraft is more efficient than the other. It always depends on the mixture of many aspects to decide whether an aircraft is efficient or not.
It is a fact that the B777 offer just much more capacity than A330 or A340 and many airlines just don't need that capacity. Usually on longhaul routes B777-(200) are seated between 260 and 320 (two/three class conf.) seats, while most A340(-300) are seated between 230 and 270 seats. For many airlines the use of a B777 would mean between 30-40 empty seats, so they decide to use an A340. The A330-300 offers the same capacity as the A340-300 but doesn't fly as far, so it is definitely not a B777 competitor. And the new star of Airbus, the A330-200, is a strong competitor to the B767-300/400ER, with seating of around 240 (two/three class).
Some airlines use mainly Airbus planes (Swissair in the coming years), some just use Boeings (Delta/American/Continental), methods to save costs. Mixtures of Boeings, Airbus, MDDs and others cost much money!
In reality many airlines use both, B777 and A330/340 in their fleets, such as Malaysia, Singapore, Thai, Korean, Asiana (to come), Air France, Cathay Pacific and Emirates.
As I can remember some of these airlines are highly profitable, so the use of both B777 and A330/340 can't be wrong. Of course it's logical to use both of them, because they are no real competitors.
Airbus enjoyed an unexpected growth in the last years and the reason was: They know how to create highly economical aircraft.
Me & You & a Plane Named Blue...