TaggedArrays

Jim Laskey jlaskey at me.com
Thu Sep 13 12:03:57 PDT 2012


On 2012-09-13, at 3:00 PM, Mark Roos <mroos at roos.com> wrote:

> Hi Jim 
> 
> When you say you are using TaggedArrays for instances are you boxing the array in another object 
> (NashObject -)  which holds other object properties?  In other words instead of instances being slots 
> in an object they are locations in an Array which is in a slot in the object. 

We are currently (prototype) only using TaggedArrays for the dynamic portion of our objects (one level of indirection), which wasn't very disruptive.  Switching to TaggedArrays for the static portion (zero levels of indirection) is a bit more disruptive and may have to wait for the next update,   But, technically there is no reason not to.

> 
> As for using a frame based construct for the stack do you see issues with generating a new frame 
> object for each send?  In older Smalltalks they had to go to a frame cache to keep this under control 
> and then we are back to nulling the slots to support GC which as Charles points out takes time. 

Allocation of a native TaggedArray is on par with allocating a Java array, so there is cost.  I'm not sure how significant  in relation to allocating boxed ints and supporting structures.  Allocating still nulls out.  Us or them.

> 
> And finally TaggedArrays seem very much like a substitute for John Rose's Fixnums 
> https://blogs.oracle.com/jrose/entry/fixnums_in_the_vm.   Do you see any need for Fixnums given 
> the work you are doing?  Other than the extra overhead of an object header it seems like a single 
> element TaggedArray is the equivalent of a Fixnum 

I would be satisfied with the Fixnum implementation as well as the new array work that John proposed.   The problem is that our needs are immediate and those technologies are a few years out.  When they become available we will likely migrate.  Maybe John can verify if migration seems reasonable.

> 
> regards 
> mar_______________________________________________
> 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/20120913/d7df4bc0/attachment.html 


More information about the mlvm-dev mailing list