Simulator vs real Device

Just noticed something interesting , and yes I know the environments are quite different.

But running the same iOS (Swift) app in the simulator, and on my iPhone

The simulator uses 34% CPU and 360meg of memory
but the iPhone only uses 13% CPU and 67meg of memory
so almost 3x the CPU and 5x the memory

Sim uses x86 code
Actual device is ARM code
And the sim is loading in whatever resources are needed to simulate the device AND simulating whatever the device is doing

I think apples advice with the sims is “use them as a first test but do final testing on real hardware” or something akin to that

That their simulators work as well as they do is quite handy
My first tests with Android Studio on macOS were awful
The sim was so slow it was downright painful
That has apparently gotten better but I have no need to look at android studio at the moment

To add some details to what Norm called out, the simulator is just that on macOS as it uses the Mac Cocoa frameworks behind the scenes in order to run. It’s a good litmus test for some things, but for others running on a physical device is preferred. Depending upon what technologies you’re running, you might find some things running slower, or faster, than what users will experience directly on device.

We’ll see what happens when Apple rolls out their Apple silicon Macs as theoretically they could produce a simulator that more closely matches the on device experience of iOS devices.

Also in case folks haven’t stumbled across this, you can send builds to your devices over Wi-Fi these days so you’re no longer stuck, physically tethered to your Mac. There’s some minor first time setup steps you need to go through while tethered, but going over Wi-Fi works pretty well most of the time. And in my experience when it doesn’t, a reboot of your Mac does the trick.