When comparing the larger 2 aircraft there is a fair bit of difference( A340 VS 747 AND A330 VS 767). The first one is cruise speed. The 747 is a good deal quicker- 0.3 M? in the cruise than the A340 as is the 767 over the 330. Then there is capacity, which in the case of the 747-400 is a fair bit more than the A340-300. In terms of avionics the A340 cockpit is more advanced and ergonomic than is the 747's. All in all both are fine aircraft.