Query On Performance between ${expression} and inline/external javascript

I would like to know writing service(@service) is performant than writing external/inline JavaScript? We have few medium levels complex code to execute during process execution so wanted to choose best approach. Are both same? which one is good as part of good practise?