Quote:
Originally Posted by fysiks
I would normally do it the last way. I doubt there would be any significant performance difference but if the list gets long, it can make the last method much easier to update and maintain.
Even if you do need a switch for other things, you can simply use the switch for the things that absolutely need it.
|
Here are some others to consider:
The function will be called several times in short periods
The list will be much longer (at least 20)
based on this, it would be better to put the string directly, or call the variable that contains the saved string