TaggedArrays (Proposal)

Mark Roos mroos at roos.com
Thu Jul 5 19:41:26 PDT 2012


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).

thanks
mark



From:   Jim Laskey <jlaskey at me.com>
To:     Da Vinci Machine Project <mlvm-dev at openjdk.java.net>
Date:   07/05/2012 01:51 PM
Subject:        Re: TaggedArrays (Proposal)
Sent by:        mlvm-dev-bounces at openjdk.java.net



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 Ji! m 

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
_______________________________________________
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/85fd5ccc/attachment.html 


More information about the mlvm-dev mailing list