I have both the 40mm and the 50 f/1.8.
The 40 is what is on my 6D about 98%, it suits me very well. I'm annoyed by the lack of mechanically coupled manual focus ring and the squeal of the STM motor, it could focus faster but overall, it's my favorite lens ever.
I use the 50 primarily for recurring auto repair shop work where lighting generally is between poor and lousy, absolute image quality is irrelevant, at f/1.8 the viewfinder is brighter with EG-S screen.
The 50's focus speed and focus hunting have both been mentioned in this thread, here's my take;
The focusing mechanisms seem to me to be extremely fast, maybe too fast.
It seems to me that the focus moves so fast that it can't stop in time, overshoots, then comes back to focus sharply.
It doesn't seem to me that it's a matter of missing and hunting for focus though.
End result is effectively the same as hunting, the overshoot and return takes time effectively equal to slow focus.
I have had lenses on my Nikons that had trouble focusing, hunt and hunt, back and forth, very frustrating, Canon 50 is not like that at all, it finds and nails focus but too often on the 2nd try after it has passed and comes back.
The cheapness of the build makes mounting the 50 feel kind of like changing into dirty clothes to do a dirty job, can't wait to finish, shower and change into clean.
I've found use for the 50 f/1.8 but cheap, sheesh...... At least it's inexpensive.
If I could only have one lens it'd be the 40, I mostly work as though the 40 is my only lens.
I've been through zooms in various ranges, I'm back to basics.