How to Optimize App Speed: Use Conditional Elements or Separate Mobile/Desktop Groups?

I have an app which needs very different designs for desktop and mobile. I want to make sure its loading speed is as fast as possible. I’m wondering which of the following options would be best.

Would having conditions on all of the text and input elements slow down the app more than having a two separate groups within a page, one for mobile and one for desktop. Then those two groups would have the condition when page width is < 400.

Double the amount of elements with two conditions on page width or less elements with tons of conditions for page width?

Separate page and separate design and use the mobile page drop-down selector and page level.

Thanks. This dropdown right?

What is page level? What do you mean by that?