Sorry, had to de-lurk and correct this
The mode @remcohn is referring to does actually stay connected. It’s not sleeping, reassociating, etc - this is IEEE PS mode where the radio sleeps between beacons which reduces the radio power significantly. Association is maintained, there’s no latency impact to outbound traffic but a small impact to inbound as the AP tells the STA during the beacon that there’s data waiting, then the STA leaves IEEE PS and receives the packet.
The Photon can definitely enable this mode too, which should result in similar wifi power consumption to the imp in the same mode (though the imp, due to the VM setup, manages all the STM clock trees automatically so application code has to do absolutely nothing to minimize the static and dynamic SoC power; we have further improvements coming here too).
One big fat note about IEEE PS mode though. It’s dumb. You will see the lowest power consumption on quiet networks. If you have a big network with loads of devices doing bonjour broadcasts constantly (I’m looking at you, printers) the savings vary immensely - the AP will wake every STA in IEEE PS mode for every broadcast, and that’s an AP-side thing hence not something you can fix in the device itself.