Multi-case function: many single-case delayed assignments; or one Which[]?

A function needs to cope with many different forms of input, such as different heads (Plus, Times, Power, etc). Should the function be defined with multiple Mathematica delayed assignments (such as “PostScriptForm[Times[-1, thing_]] := …”) or with one large assignment, likely to be of the form PostScriptForm[thing_] := Which[ MatchQ[…], …, MatchQ[…], …, ]?

If the context helps, it is about PostScriptForm, which converts to PostScript as CForm converts to C.

Either form could work: which is more natural idiomatic Mathematica?

Edit: a related question. If multiple statements, as recommended in @eldo’s answer, should the statements be in different cells, or in the same cell separated by a blank line, or in the same cell without separations? Again, which is more natural idiomatic Mathematica?

• Possible duplicate: (60846) – Mr.Wizard Jan 29 '16 at 2:41
• By the I addressed the performance issue in (2618) and I agree with eldo. – Mr.Wizard Jan 29 '16 at 2:42

I usually prefer multiple function definitions. I find they are clearer to read, and they are usually faster, especially if you can avoid conditions, i.e. f[1] := ... is better than f[x_] /; x == 1 ...

Clear[f, g]

f[1] := 2
f[2] := 3
f[3] := 4
f[x_] := x

g[x_] := Switch[x, 1, 2, 2, 3, 3, 4, _, x]

f /@ Range[10^5]; // AbsoluteTiming // First


0.109200

g /@ Range[10^5]; // AbsoluteTiming // First


0.280801

• Is the speed ordering general over most multi-case functions? I.e., have you previously tested some less-simple actual functions, with the same result? But, to argue the other possibility, would it be tidier to keep a function together and in one place by Which or Switch? – jdaw1 Dec 27 '15 at 22:18
• Question edited to add a sub-question to your answer. – jdaw1 Dec 27 '15 at 23:44