Depends what performance you are aiming on; Developer performance or app performance.
In general a direct SQL can perform better than XPath which needs to be converted in SQL. But why the hassle of implementing your own SQL queries, when XPath is out of the box available and performing well in most situations?
Also since XPath is available everywhere in Mendix and most easy to maintain.
Thus my best practice; always use XPath.
If there is a reduction performance;