TaggedArrays (Proposal)

Jim Laskey jlaskey at me.com
Thu Jul 5 13:42:06 PDT 2012


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.  With TaggedArray slots for frames we could use integer dynamically.

Cheers,

-- Jim






On 2012-07-05, at 5:26 PM, Mark Roos wrote:

> 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 allocation when using 
> a 'for' like pattern to index over an array. That is a real performance hit for me so I 
> am looking for a good solution 
> 
> thanks 
> mark_______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20120705/74b19069/attachment.html 


More information about the mlvm-dev mailing list