Re: Project Valhalla – Value Types slides from ScalaDays Amsterdam 2015

Vitaly Davidovich vitalyd at gmail.com
Fri Jun 12 21:26:02 UTC 2015


Simon,

That's my fault - I misread the slide.  So ignore that part of my initial
email :).

Yes, class ref can participate in being compressed.  On 64 bit hotspot,
you're looking at 12 bytes overhead (8 mark word + 4 compressed class); the
4 byte alignment gap is allocatable to fields that fit (i.e. int and coops
and smaller), AFAIK.

sent from my phone
On Jun 12, 2015 5:07 PM, "Simon Ochsenreither" <simon at ochsenreither.de>
wrote:

> Hi Brian, hi Vitaly,
>
> thanks for your comments!
>
> > #11: object headers are typically 2 words; a klass pointer and a word
> for various identity support (GC mark bits, locking, etc.) Which makes the
> density story with small objects even worse.
>
> Yes, absolutely! I changed the original from "4 byte" to ">= 4 byte"
> only because I was concerned that it would provoke some non-useful
> response saying "but obscure JVM vendor implementation X version 23.42
> does X in only 4 bytes!!!".
>
> So I decided that "at least 4 bytes" would be better ... but I would be
> happy to revise it again if you could provide more information. (E. g.
> "_everyone_ implements it this way...")
>
> (Btw, doesn't the klass pointer participate in compressed oops?)
>
> > In general, values give us both DENSITY (memory efficiency) and FLATNESS
> (cache efficiency.)
>
> You are right, I should have mentioned that! (There are a few things I
> mentioned that weren't on the slides, but I forgot a lot to mention, too!)
>
> For instance, I papered over the whole topic of boxing! :-/
>
> > #36: in addition to the __ByValue obviously being a syntax placeholder,
>
> Yes, I made that clear in the talk. Although I should have added that to
> the slides too.
>
> > the restrictions outlined e.g. in #38 (must say final) will also go away
>> > we’re just not focusing at all on syntax for the time being.
>
> Great, thanks for the info!
>
> > #39: equality on value types will work as it does on primitives (as you
> suggest on #88)
>
> Thanks!
>
> > #121: good summary
>
> :-)
>
> > 2) value types cannot hold a ref field that's null? I think I saw that
> on one of the slides.  If so, why?
>
> Maybe that was worded misleadingly. What I meant was that the value type
> itself is non-nullable. It can of course have ref fields that can be
> null. (I thought the example made it clear ...)
>
> Thanks to both of you for the review.
> I think the didn't go too well, because I was working on my slides until
> the last minute (projector/filming equipment required 16:9 which meant I
> had 300 pixels less height than I assumed). Then I didn't get the
> mirroring working on my notebook, so I only had the slides in my back,
> the audience in front, and couldn't move to a better place because I
> needed to click through the slides on my notebook. :-/
> I guess my English grammar was falling apart, too, due to the lack of
> sleep.
>
> Bye,
>
> Simon
>



More information about the valhalla-dev mailing list