Optimal lm317 layout

Hi guys lately ive been obsessed with squeezing the most out of my lm317 supply. My question now is how the layout should be around the adjust pin, involving the variable resistor and the bypass cap. The layout for my board is such that the two components cant be equal distance from the adjust pin. So my question is should the resistor be closer or the cap closer to the adust pin, and why?
 
The capacitor, since this determines the loop inductance. However, the routing to the circuit being powered
is equally, if not more, important. A local input capacitor may also be required. But smt parts, including the 317,
would be best.
 
Last edited: