hello mr apple meet mr orange
now pop up the mtfs of the 50 1.4 and the 50 1.8 @ f2.8
You need to get out of the orchard and head to school - MTF-101 is the class you need to take.
The 40/2.8 is better wide open (which is a relative measure). Comparing one lens wide open at f/2.8 to faster lenses stopped down to f/2.8 would, indeed, be comparing apples to oranges - that's why we also compare at f/8. The 40/2.8 is better at f/8 (which is as close as you're going to get to an absolute measure in this case). Therefore, the 40/2.8 delivers better sharpness based on MTF50. Granted - that says nothing about color, bokeh, flare, etc.
Since when does an Internet pixel peeper care about the latter three?