swift - Complexity Analysis of Structs and Enums -


does know complexity initialize struct or enum?

or, know of 3 costs least amount of time/resources allocate memory for?

in situation, i'm using struct/enum house variables me reference later. example, here's equivalent struct/enum:

using struct:

struct identifier {     static let key = "a long string dictionary key, shortened using struct." } let dictionaryitem = adictionary[identifier.key] 

now using enums:

enum identifier: string {     case key = "a long string dictionary key, shortened using enum." }  let dictionaryitem = adictionary[identifier.key.rawvalue] 

which faster? more effi


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -