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

jquery - How do you format the date used in the popover widget title of FullCalendar? -

Bubble Sort Manually a Linked List in Java -

asp.net mvc - SSO between MVCForum and Umbraco7 -