I don't know; there are so many elements to take into account.
First of all, it depends on the depth and weight of the snow or sand and of the solidity of the ground (under the snow or sand).
On the beach, when the sand feels warm, light and soft, not muddy and not too deep, it is certainly nice to walk there with bare feet. But for running over longer distances, it requires more efforts than on a normal path.
But on the other hand, with good winter shoes and on a well beaten snow path, walking is quite nice, as far as the snow is not too slippery, i.e. clabbery or frozen.
That reminds me of certain extreme winter conditions with deep snow.
Once, after extreme snow falls over night, I had to walk or rather climb and crawl through more than hip-deep, rather wet and heavy snow, and that for more than an hour, to get to work. No path had been cleared at that time, no bus and no car could be used, as the whole traffic had been incapacitated, and it took the clearing services about 4 hours to get the main ways, streets, lines and paths cleared and restore about normal conditions.