I tend to prefer the former because it makes it easier to read the script without opening up the script step. I don't believe there's a significant performance different (not that I've ever seen, anyway).
I prefer a bit of a third option. To make a script, but use the SetField with the Case() you have illustrated in your second example.
Firstly, by making it a script vs a script-step via the button, I can organize the processes in one place vs several buttons across multiple layouts; so consolidation is important to me. Secondly, I prefer the Case() in general when doing considerations of data like this since it stops after the first true evaluation. So, though small, the processing is faster.
Finally, by having in a script allows me to add in the future at-will (adding access rights, other sub-scripts, etc.), should the need arise.