Which is faster? Switch statement or dictionary?

后端 未结 0 503
误落风尘
误落风尘 2021-02-02 05:12

I see a lot of the following enum-to-string conversion in Objective-c/C at work. Stuff like:

static NSString *_TranslateMyAnimalToNSString(MyAnimal animal)
{
             


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题