Re: TaggedArrays (Proposal)

2012-07-05 Thread Mark Roos
Hi Jim I was wondering if you could post the use case that led you develop the TaggedArray? I looked over our Smalltalk app and I could not see an obvious pattern where mixing primitives and references in a collection is common. On a similar note I was curious how you are avoiding the integer

Re: TaggedArrays (Proposal)

2012-07-05 Thread Jim Laskey
Fairly common patterns like var p = { fontsize: 15, lineheight: 22, color: 0x000, fontfamily: "Georgia, FreeSerif, Times, serif" }; p.color = "white"; We need flexible slots without allocating 2x memory. For "for like" constructs we typically use static analysis to reduce to integer.

Re: TaggedArrays (Proposal)

2012-07-05 Thread Rémi Forax
On 07/05/2012 10:42 PM, Jim Laskey wrote: > Fairly common patterns like > > var p = { > fontsize: 15, > lineheight: 22, > color: 0x000, > fontfamily: "Georgia, FreeSerif, Times, serif" > }; > > p.color = "white"; > > We need flexible slots without allocating 2x memory. > > For "for like" c

Re: TaggedArrays (Proposal)

2012-07-05 Thread Jim Laskey
On 2012-07-05, at 9:26 PM, Rémi Forax wrote: > On 07/05/2012 10:42 PM, Jim Laskey wrote: >> Fairly common patterns like >> >> var p = { >> fontsize: 15, >> lineheight: 22, >> color: 0x000, >> fontfamily: "Georgia, FreeSerif, Times, serif" >> }; >> >> p.color = "white"; >> >> We need flexi

Re: TaggedArrays (Proposal)

2012-07-05 Thread Mark Roos
I see, it looks like you are using them to hold instance vars of objects. I was looking for large arrays/collections. I have looked at this before in our app but the number of integers used like this did not seem to warrant much concern ( Double Vectors and byte[] are the dominant memory users)