Re: [swift-users] Memory used by enums

2016-04-05 Thread Joe Groff via swift-users
> On Apr 4, 2016, at 4:57 PM, Jonathan Hull via swift-users > wrote: > > I had a quick question on the memory used by enums with associated values in > the current implementation. If I have an enum like the following: > > enum MyEnum { > case mostCommonlyUsed > case somewhatCommo

Re: [swift-users] Memory used by enums

2016-04-05 Thread Jens Alfke via swift-users
> On Apr 4, 2016, at 4:57 PM, Jonathan Hull via swift-users > wrote: > > If this enum is going to be used by tens/hundreds of thousands of structs, am > I actually saving any space by breaking out the rarer cases which store more > data or is the footprint just equal to the largest case? Enu

Re: [swift-users] Memory used by enums

2016-04-05 Thread Daniel Eggert via swift-users
On 05 Apr 2016, at 01:57, Jonathan Hull via swift-users wrote: > > I had a quick question on the memory used by enums with associated values in > the current implementation. If I have an enum like the following: > > enum MyEnum { > case mostCommonlyUsed > case somewhatCommon (Int,

[swift-users] Memory used by enums

2016-04-05 Thread Jonathan Hull via swift-users
I had a quick question on the memory used by enums with associated values in the current implementation. If I have an enum like the following: enum MyEnum { case mostCommonlyUsed case somewhatCommon (Int,Int) case prettyRare (Int,Int,Int,Int,Int) } If this enum is going