I just got the Marshmallow update on my Nexus 7 last night and I did not find it necessary to do a factory reset at all. Generally I will do an update first and then if it seems like it is causing issues I will do a factory reset to see if it fixes it. But in general a factory reset is not required when updating to a new version. I think I have only had to do a factory reset once out of the last 5 or 6 system updates that I have received on various devices.
But if you were planning to do a reset anyway, either way works. The system update will probably take less time to install on a clean device, but it may bump you device back in line for updates. Personally if the update is available I would go ahead and do the update first even if I was planning on resetting it later.