Computers don't care how code is written or formatted, but humans do.

A computer will parse and execute your code whether it's written on a single line or multiple.

So, don't optimise for computers.

Optimise your code for humans.

People read more code than they write, so write your code in a readable way so it's easy for people to read and understand - not the computer.