Thank you for your thoughts.
I don`t know any drawbacks with always naming functions. In fact they also would be obfusicated during minimisation, if you do.
Performance also could be no reason to do so. You should consider performance issues, when they appear and not upfront — in my opinion. I can`t imagine that this could be ever relevant, nor has it happend to any code I saw. The reason for bad performance in the past was always something else.
I think the same holds for arrays vs. objects. It is nice to know what is faster, I think arrays, but not relevant for every day code, we all probably write.
Quote from Michael A. Jackson:
The First Rule of Program Optimisation: Don’t do it.
The Second Rule of Program Optimisation (for experts only!): Don’t do it yet.
The most important thing should be: write clear, simple and as little code as possible. The less you write, the less the reader had to understand.
The switch conversion seems to me easier to understand. It needs less lines to communicate what is really happening: A replacement.
At the moment, to write a post and respond to people, reading it. It’s an amazing world, we are in.