Depending on your C++ optimization setting (e.g. -O2, etc) the code most likely ends up being executed identically in the end. I just did a quick test and all three styles above (when used in pure C++, but the Stan translation is fairly direct here) yield the same assembly code at O2
If you use stanc’s optimizations it should remove the NaN initialization.
This means the style which doesn’t use else would have benefits if the type of mu is a vector or matrix, since gcc or clang’s optimizer most likely wouldn’t delete the object creation.