Can we also get some feedback on specialization, please?

MacGregor, Duncan (GE Energy Management) duncan.macgregor at ge.com
Sat Jan 10 03:47:20 UTC 2015


And another thing...

If I want to try and combine the use of VarHandles and specialisation to make something with atomic properties (as I'm sure we'll all want to do for concurrent collections) then at the moment I can't use static fields for the var handles, and the JIT is almost certainly going to hate me if I they are stored on instance fields. I think we'll need some way to specify static fields as specialised and provide initialisers for them. This cannot be done by simply having different statics for different layers since each specialised class will need it's own statics.

I'm sure there's also some evil I can perpetrate by specialising CallSites, but I haven't though of a really convincing case for doing so yet (at least not until I can define typed tuples when I can maybe replace various varargs fallbacks), and I hit the same statics problem as above with MethodHandles anyway.
________________________________________
From: valhalla-dev [valhalla-dev-bounces at openjdk.java.net] on behalf of Brian Goetz [brian.goetz at oracle.com]
Sent: 05 January 2015 19:35
To: valhalla-dev at openjdk.java.net
Subject: Can we also get some feedback on specialization, please?

There's been a lot of passionate discussion here about the directions we
should or should not take Java. And this is all understandable, and
perhaps inevitable, but ... it seems to be crowding out what is actually
the primary purpose of this (-dev) list.  We had hoped, in taking the
effort to write up State of the Specialization, to get some comments on
... specialization :)

So far, nearly all the comments have been on the speculative parts of
the writeup (layers/conditional methods), as well as the usual
(supersized) portion of "I think you should do X/Y/Z instead".  Which is
all OK, but we were actually hoping to get some feedback on the part
that is written up in some detail -- and mostly implemented!  I know
it's fun to discuss the big sexy stuff, but we can't let this crowd out
the main goal.

So my question is: has anyone tried to write a program with specialized
generics with the valhalla implementation?   Well, we'd really
appreciate it.

I know people want to contribute.  At least right now, here's what
contribution looks like from our perspective:

    1.) Please try it out!  Write some code!
    2.) Tell us what works and what doesn't!
    3.) Nice comments are always a bonus!  (And are welcome even if you
didn't do (1) and (2)).
    4.) If you can't do (1) and (2), and still have something important
to say in the big-picture department, please do it a) nicely, b)
constructively, c) succinctly.

Thanks,
-Brian



More information about the valhalla-dev mailing list